File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -138,8 +138,14 @@ public function testGenerateProductUrlRewrites()
138
138
->willReturn (1 );
139
139
$ category ->expects ($ this ->any ())
140
140
->method ('getData ' )
141
- ->with ('save_rewrites_history ' )
142
- ->willReturn (true );
141
+ ->withConsecutive (
142
+ [$ this ->equalTo ('save_rewrites_history ' )],
143
+ [$ this ->equalTo ('initial_setup_flag ' )]
144
+ )
145
+ ->willReturnOnConsecutiveCalls (
146
+ true ,
147
+ null
148
+ );
143
149
144
150
/* @var \Magento\Catalog\Model\Category|\PHPUnit_Framework_MockObject_MockObject $childCategory1 */
145
151
$ childCategory1 = $ this ->getMockBuilder (\Magento \Catalog \Model \Category::class)
@@ -175,6 +181,7 @@ public function testGenerateProductUrlRewrites()
175
181
->method ('addIdFilter ' )
176
182
->willReturnSelf ();
177
183
$ productCollection ->expects ($ this ->any ())->method ('setStoreId ' )->willReturnSelf ();
184
+ $ productCollection ->expects ($ this ->any ())->method ('addStoreFilter ' )->willReturnSelf ();
178
185
$ productCollection ->expects ($ this ->any ())->method ('addAttributeToSelect ' )->willReturnSelf ();
179
186
$ iterator = new \ArrayIterator ([]);
180
187
$ productCollection ->expects ($ this ->any ())->method ('getIterator ' )->will ($ this ->returnValue ($ iterator ));
You can’t perform that action at this time.
0 commit comments