File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
app/code/Magento/Sales/Test/Unit/Model/Order/Address Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -178,19 +178,17 @@ private function setStoreExpectations(): void
178
178
$ expected = [$ storeMock , $ originalStoreMock ];
179
179
$ matcher = $ this ->exactly (count ($ expected ));
180
180
$ this ->storeManagerMck ->expects (self ::once ())->method ('getStore ' )->willReturn ($ originalStoreMock );
181
- $ this ->storeManagerMck ->expects ($ matcher )->method ('setCurrentStore ' )->with (
181
+ $ this ->storeManagerMck ->expects (self :: any () )->method ('setCurrentStore ' )->with (
182
182
$ this ->callback (function ($ store ) use ($ matcher , $ expected ) {
183
- $ this ->assertEquals ($ store , $ expected [$ matcher ->getInvocationCount () - 1 ]);
183
+ $ this ->assertEquals ($ store , $ expected [$ matcher ->getInvocationCount ()]);
184
184
return true ;
185
185
})
186
186
);
187
187
188
188
// One call to setup the store from the order, and an other one to rollback to the original store value
189
- $ expected = [$ storeMock , $ originalStoreMock ];
190
- $ matcher = $ this ->exactly (count ($ expected ));
191
- $ this ->customerAddressConfigMock ->expects ($ matcher )->method ('setStore ' )->with (
189
+ $ this ->customerAddressConfigMock ->expects (self ::any ())->method ('setStore ' )->with (
192
190
$ this ->callback (function ($ store ) use ($ matcher , $ expected ) {
193
- $ this ->assertEquals ($ store , $ expected [$ matcher ->getInvocationCount () - 1 ]);
191
+ $ this ->assertEquals ($ store , $ expected [$ matcher ->getInvocationCount ()]);
194
192
return true ;
195
193
})
196
194
);
You can’t perform that action at this time.
0 commit comments