1 | <?php |
||
19 | class UrlAliasMapperTest extends LanguageAwareTestCase |
||
20 | { |
||
21 | protected $fixture = array( |
||
22 | 0 => array( |
||
23 | 'action' => 'eznode:314', |
||
24 | 'parent' => '1', |
||
25 | 'text_md5' => 'f97c5d29941bfb1b2fdab0874906ab82', |
||
26 | 'raw_path_data' => array( |
||
27 | 0 => array( |
||
28 | array( |
||
29 | 'lang_mask' => 2, |
||
30 | 'text' => 'root_us', |
||
31 | ), |
||
32 | array( |
||
33 | 'lang_mask' => 4, |
||
34 | 'text' => 'root_gb', |
||
35 | ), |
||
36 | ), |
||
37 | 1 => array( |
||
38 | array( |
||
39 | 'lang_mask' => 4, |
||
40 | 'text' => 'one', |
||
41 | ), |
||
42 | ), |
||
43 | ), |
||
44 | 'lang_mask' => 5, |
||
45 | 'is_original' => '1', |
||
46 | 'is_alias' => '1', |
||
47 | 'alias_redirects' => '0', |
||
48 | ), |
||
49 | 1 => array( |
||
50 | 'action' => 'eznode:314', |
||
51 | 'parent' => '2', |
||
52 | 'text_md5' => 'b8a9f715dbb64fd5c56e7783c6820a61', |
||
53 | 'raw_path_data' => array( |
||
54 | 0 => array( |
||
55 | array( |
||
56 | 'lang_mask' => 3, |
||
57 | 'text' => 'two', |
||
58 | ), |
||
59 | ), |
||
60 | ), |
||
61 | 'lang_mask' => 3, |
||
62 | 'is_original' => '0', |
||
63 | 'is_alias' => '0', |
||
64 | 'alias_redirects' => '1', |
||
65 | ), |
||
66 | 2 => array( |
||
67 | 'action' => 'module:content/search', |
||
68 | 'parent' => '0', |
||
69 | 'text_md5' => '35d6d33467aae9a2e3dccb4b6b027878', |
||
70 | 'raw_path_data' => array( |
||
71 | 0 => array( |
||
72 | array( |
||
73 | 'lang_mask' => 6, |
||
74 | 'text' => 'three', |
||
75 | ), |
||
76 | ), |
||
77 | ), |
||
78 | 'lang_mask' => 6, |
||
79 | 'is_original' => '1', |
||
80 | 'is_alias' => '1', |
||
81 | 'alias_redirects' => '1', |
||
82 | ), |
||
83 | 3 => array( |
||
84 | 'action' => 'nop:', |
||
85 | 'parent' => '3', |
||
86 | 'text_md5' => '8cbad96aced40b3838dd9f07f6ef5772', |
||
87 | 'raw_path_data' => array( |
||
88 | 0 => array( |
||
89 | array( |
||
90 | 'lang_mask' => 1, |
||
91 | 'text' => 'four', |
||
92 | ), |
||
93 | ), |
||
94 | ), |
||
95 | 'lang_mask' => 1, |
||
96 | 'is_original' => '0', |
||
97 | 'is_alias' => '0', |
||
98 | 'alias_redirects' => '1', |
||
99 | ), |
||
100 | 4 => array( |
||
101 | 'action' => 'nop:', |
||
102 | 'parent' => '3', |
||
103 | 'text_md5' => '1d8d2fd0a99802b89eb356a86e029d25', |
||
104 | 'raw_path_data' => array( |
||
105 | 0 => array( |
||
106 | array( |
||
107 | 'lang_mask' => 8, |
||
108 | 'text' => 'drei', |
||
109 | ), |
||
110 | ), |
||
111 | ), |
||
112 | 'lang_mask' => 8, |
||
113 | 'is_original' => '0', |
||
114 | 'is_alias' => '0', |
||
115 | 'alias_redirects' => '1', |
||
116 | ), |
||
117 | ); |
||
118 | |||
119 | protected function getExpectation() |
||
232 | |||
233 | public function providerForTestExtractUrlAliasFromData() |
||
237 | |||
238 | /** |
||
239 | * Test for the extractUrlAliasFromData() method. |
||
240 | * |
||
241 | * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Mapper::extractUrlAliasFromData |
||
242 | * @dataProvider providerForTestExtractUrlAliasFromData |
||
243 | */ |
||
244 | public function testExtractUrlAliasFromData($index) |
||
256 | |||
257 | /** |
||
258 | * Test for the extractUrlAliasListFromData() method. |
||
259 | * |
||
260 | * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Mapper::extractUrlAliasListFromData |
||
261 | * @depends testExtractUrlAliasFromData |
||
262 | */ |
||
263 | public function testExtractUrlAliasListFromData() |
||
272 | |||
273 | /** |
||
274 | * Test for the extractLanguageCodesFromData method. |
||
275 | * |
||
276 | * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Mapper::extractLanguageCodesFromData |
||
277 | */ |
||
278 | public function testExtractLanguageCodesFromData() |
||
287 | |||
288 | /** |
||
289 | * @return \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Mapper |
||
290 | */ |
||
291 | protected function getMapper() |
||
298 | } |
||
299 |