File tree Expand file tree Collapse file tree 5 files changed +47
-0
lines changed Expand file tree Collapse file tree 5 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 3
3
* meta/types/ObjectType.class.php, test/misc/DAOTest.class.php: changed logic
4
4
for getObjectId method of lazy encapsulant; test for lazy logic added
5
5
6
+ 2011-11-29 Igor V. Gulyaev
7
+
8
+ * test/main/ViewTest.class.php: added View test
9
+
6
10
2011-11-21 Evgeny V. Kokovikhin
7
11
8
12
* core/DB/PostgresDialect.class.php, test/main/PostgresDialectTest.class.php:
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /***************************************************************************
3
+ * Copyright (C) 2011 by Igor V. Gulyaev *
4
+ * *
5
+ * This program is free software; you can redistribute it and/or modify *
6
+ * it under the terms of the GNU Lesser General Public License as *
7
+ * published by the Free Software Foundation; either version 3 of the *
8
+ * License, or (at your option) any later version. *
9
+ * *
10
+ ***************************************************************************/
11
+
12
+ final class ViewTest extends TestCase
13
+ {
14
+ protected static $ resolver ;
15
+
16
+ public static function setUpBeforeClass ()
17
+ {
18
+ self ::$ resolver = new PhpViewResolver (ONPHP_TEST_PATH .'main/data/views/ ' , EXT_TPL );
19
+ }
20
+
21
+ public static function tearDownAfterClass ()
22
+ {
23
+ self ::$ resolver = NULL ;
24
+ }
25
+
26
+ public function testToString ()
27
+ {
28
+ $ renderView = self ::$ resolver ->resolveViewName ('testView ' );
29
+ $ toStringView = self ::$ resolver ->resolveViewName ('testViewToString ' );
30
+
31
+ $ model = Model::create ();
32
+
33
+ $ this ->assertTrue (
34
+ $ toStringView ->toString ($ model ) == $ renderView ->toString ($ model )
35
+ );
36
+ }
37
+ }
38
+ ?>
Original file line number Diff line number Diff line change
1
+ PartView
Original file line number Diff line number Diff line change
1
+ TestView Begin < ?php
2
+ $partViewer-> view('testPartView')
3
+ ?> TestViewEnd
Original file line number Diff line number Diff line change
1
+ TestView Begin < ?=$partViewer-> toString('testPartView')?> TestViewEnd
You can’t perform that action at this time.
0 commit comments