1 | <?php |
||
19 | class PageTest extends PHPUnit_Framework_TestCase |
||
20 | { |
||
21 | const PAGE_XML_REFERENCE = <<<EOT |
||
22 | <?xml version="1.0"?> |
||
23 | <page> |
||
24 | <zone id="id_6c7f907b831a819ed8562e3ddce5b264"> |
||
25 | <block id="id_1e1e355c8da3c92e80354f243c6dd37b"> |
||
26 | <name>Campaign</name> |
||
27 | <type>Campaign</type> |
||
28 | <view>default</view> |
||
29 | <overflow_id></overflow_id> |
||
30 | <zone_id>6c7f907b831a819ed8562e3ddce5b264</zone_id> |
||
31 | </block> |
||
32 | <block id="id_250bcab3ea2929edbf72ece096dcdb7a"> |
||
33 | <name>Amazon Gallery</name> |
||
34 | <type>Gallery</type> |
||
35 | <view>default</view> |
||
36 | <overflow_id></overflow_id> |
||
37 | <zone_id>6c7f907b831a819ed8562e3ddce5b264</zone_id> |
||
38 | <item action="add"> |
||
39 | <object_id>62</object_id> |
||
40 | <node_id>64</node_id> |
||
41 | <priority>1</priority> |
||
42 | <ts_publication>1393607060</ts_publication> |
||
43 | <ts_visible>1393607060</ts_visible> |
||
44 | <ts_hidden>1393607060</ts_hidden> |
||
45 | <rotation_until>1393607060</rotation_until> |
||
46 | <moved_to>42</moved_to> |
||
47 | </item> |
||
48 | <item action="add" /> |
||
49 | </block> |
||
50 | <zone_identifier>left</zone_identifier> |
||
51 | </zone> |
||
52 | <zone id="id_656b2182b4be70f18ca7b44b3fbb6dbe"> |
||
53 | <block id="id_4d2f5e57d2a2528b276cd9e776a62e42"> |
||
54 | <name>Featured Video</name> |
||
55 | <type>Video</type> |
||
56 | <view>default</view> |
||
57 | <overflow_id></overflow_id> |
||
58 | <zone_id>656b2182b4be70f18ca7b44b3fbb6dbe</zone_id> |
||
59 | </block> |
||
60 | <block id="id_f36743396b8c36f10b467aa52f133e58"> |
||
61 | <name>Travel Information</name> |
||
62 | <type>ContentGrid</type> |
||
63 | <view>default</view> |
||
64 | <overflow_id></overflow_id> |
||
65 | <zone_id>656b2182b4be70f18ca7b44b3fbb6dbe</zone_id> |
||
66 | </block> |
||
67 | <zone_identifier>right</zone_identifier> |
||
68 | </zone> |
||
69 | <zone_layout>2ZonesLayout1</zone_layout> |
||
70 | </page> |
||
71 | EOT; |
||
72 | |||
73 | /** |
||
74 | * @var \eZ\Publish\Core\FieldType\Page\Parts\Page |
||
75 | */ |
||
76 | private $pageReference; |
||
77 | |||
78 | /** |
||
79 | * @var \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\PageConverter |
||
80 | */ |
||
81 | private $converter; |
||
82 | |||
83 | protected function setUp() |
||
179 | |||
180 | /** |
||
181 | * Test converting XML to Parts\Page. |
||
182 | */ |
||
183 | public function testToFieldValue() |
||
191 | |||
192 | /** |
||
193 | * Test converting Parts\Page to XML. |
||
194 | */ |
||
195 | public function testToStorageValue() |
||
202 | |||
203 | /** |
||
204 | * Test converting from XML to storage and back. |
||
205 | */ |
||
206 | public function testFromStorageAndBack() |
||
239 | } |
||
240 |