@@ -96,9 +96,9 @@ public function getUrlPathDataProvider()
96
96
$ noGenerationLevel = CategoryUrlPathGenerator::MINIMAL_CATEGORY_LEVEL_FOR_PROCESSING - 1 ;
97
97
return [
98
98
[Category::TREE_ROOT_ID , 'url-path ' , $ noGenerationLevel , '' , false , false , '' ],
99
- [' parent_id ' , 'url-path ' , $ noGenerationLevel , '' , false , false , 'url-path ' ],
100
- [' parent_id ' , 'url-path ' , $ noGenerationLevel , 'url-key ' , true , false , 'url-key ' ],
101
- [' parent_id ' , 'url-path ' , $ noGenerationLevel , 'url-key ' , false , true , 'url-key ' ],
99
+ [13 , 'url-path ' , $ noGenerationLevel , '' , false , false , 'url-path ' ],
100
+ [13 , 'url-path ' , $ noGenerationLevel , 'url-key ' , true , false , 'url-key ' ],
101
+ [13 , 'url-path ' , $ noGenerationLevel , 'url-key ' , false , true , 'url-key ' ],
102
102
];
103
103
}
104
104
@@ -110,7 +110,7 @@ public function getUrlPathWithParentDataProvider()
110
110
$ requireGenerationLevel = CategoryUrlPathGenerator::MINIMAL_CATEGORY_LEVEL_FOR_PROCESSING ;
111
111
$ noGenerationLevel = CategoryUrlPathGenerator::MINIMAL_CATEGORY_LEVEL_FOR_PROCESSING - 1 ;
112
112
return [
113
- ['url-key ' , false , $ requireGenerationLevel , ' parent_id ' , 'parent-path ' , 'parent-path/url-key ' ],
113
+ ['url-key ' , false , $ requireGenerationLevel , 13 , 'parent-path ' , 'parent-path/url-key ' ],
114
114
['url-key ' , false , $ requireGenerationLevel , Category::TREE_ROOT_ID , null , 'url-key ' ],
115
115
['url-key ' , true , $ noGenerationLevel , Category::TREE_ROOT_ID , null , 'url-key ' ],
116
116
];
@@ -136,7 +136,7 @@ public function testGetUrlPathWithParent(
136
136
$ urlPath = null ;
137
137
$ parentLevel = CategoryUrlPathGenerator::MINIMAL_CATEGORY_LEVEL_FOR_PROCESSING - 1 ;
138
138
$ this ->category ->expects ($ this ->any ())->method ('getParentId ' )
139
- ->will ($ this ->returnValue (' parent_id ' ));
139
+ ->will ($ this ->returnValue (13 ));
140
140
$ this ->category ->expects ($ this ->any ())->method ('getLevel ' )
141
141
->will ($ this ->returnValue ($ level ));
142
142
$ this ->category ->expects ($ this ->any ())->method ('getUrlPath ' )->will ($ this ->returnValue ($ urlPath ));
@@ -152,7 +152,7 @@ public function testGetUrlPathWithParent(
152
152
$ parentCategory ->expects ($ this ->any ())->method ('dataHasChangedFor ' )
153
153
->will ($ this ->returnValueMap ([['url_key ' , false ], ['path_ids ' , false ]]));
154
154
155
- $ this ->categoryRepository ->expects ($ this ->any ())->method ('get ' )->with (' parent_id ' )
155
+ $ this ->categoryRepository ->expects ($ this ->any ())->method ('get ' )->with (13 )
156
156
->will ($ this ->returnValue ($ parentCategory ));
157
157
158
158
$ this ->assertEquals ($ result , $ this ->categoryUrlPathGenerator ->getUrlPath ($ this ->category ));
@@ -205,7 +205,7 @@ public function testGetUrlPathWithSuffixWithoutStore()
205
205
$ result = 'url-path.html ' ;
206
206
207
207
$ this ->category ->expects ($ this ->any ())->method ('getStoreId ' )->will ($ this ->returnValue ($ storeId ));
208
- $ this ->category ->expects ($ this ->once ())->method ('getParentId ' )->will ($ this ->returnValue (' parent_id ' ));
208
+ $ this ->category ->expects ($ this ->once ())->method ('getParentId ' )->will ($ this ->returnValue (2 ));
209
209
$ this ->category ->expects ($ this ->once ())->method ('getUrlPath ' )->will ($ this ->returnValue ($ urlPath ));
210
210
$ this ->category ->expects ($ this ->exactly (2 ))->method ('dataHasChangedFor ' )
211
211
->will ($ this ->returnValueMap ([['url_key ' , false ], ['path_ids ' , false ]]));
0 commit comments