File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
Catalog/Test/Unit/Model/Indexer
Sales/Test/Unit/Model/Order/Address Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \Catalog \Test \Unit \Model \Indexer \Category \Product \Action ;
9
9
10
+ use Magento \Catalog \Model \Product \Visibility ;
10
11
use Magento \Eav \Model \Entity \Attribute \AbstractAttribute ;
12
+ use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
11
13
use Magento \Store \Model \StoreManagerInterface ;
12
14
use Magento \Store \Model \Store ;
13
15
use Magento \Catalog \Model \Config ;
@@ -112,6 +114,15 @@ class RowsTest extends TestCase
112
114
*/
113
115
protected function setUp () : void
114
116
{
117
+ $ objectManager = new ObjectManager ($ this );
118
+ $ objects = [
119
+ [
120
+ Visibility::class,
121
+ $ this ->createMock (Visibility::class)
122
+ ]
123
+ ];
124
+ $ objectManager ->prepareObjectManager ($ objects );
125
+
115
126
$ this ->workingStateProvider = $ this ->getMockBuilder (WorkingStateProvider::class)
116
127
->disableOriginalConstructor ()
117
128
->getMock ();
Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \Catalog \Test \Unit \Model \Indexer \Product \Category \Action ;
9
9
10
+ use Magento \Catalog \Model \Product \Visibility ;
10
11
use Magento \Eav \Model \Entity \Attribute \AbstractAttribute ;
12
+ use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
11
13
use Magento \Store \Model \StoreManagerInterface ;
12
14
use Magento \Store \Model \Store ;
13
15
use Magento \Catalog \Model \Config ;
@@ -112,6 +114,15 @@ class RowsTest extends TestCase
112
114
*/
113
115
protected function setUp () : void
114
116
{
117
+ $ objectManager = new ObjectManager ($ this );
118
+ $ objects = [
119
+ [
120
+ Visibility::class,
121
+ $ this ->createMock (Visibility::class)
122
+ ]
123
+ ];
124
+ $ objectManager ->prepareObjectManager ($ objects );
125
+
115
126
$ this ->workingStateProvider = $ this ->getMockBuilder (WorkingStateProvider::class)
116
127
->disableOriginalConstructor ()
117
128
->getMock ();
Original file line number Diff line number Diff line change @@ -180,15 +180,15 @@ private function setStoreExpectations(): void
180
180
$ this ->storeManagerMck ->expects (self ::once ())->method ('getStore ' )->willReturn ($ originalStoreMock );
181
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 ()]);
183
+ $ this ->assertEquals ($ store , $ expected [$ matcher ->numberOfInvocations ()]);
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
189
$ this ->customerAddressConfigMock ->expects (self ::any ())->method ('setStore ' )->with (
190
190
$ this ->callback (function ($ store ) use ($ matcher , $ expected ) {
191
- $ this ->assertEquals ($ store , $ expected [$ matcher ->getInvocationCount ()]);
191
+ $ this ->assertEquals ($ store , $ expected [$ matcher ->numberOfInvocations ()]);
192
192
return true ;
193
193
})
194
194
);
You can’t perform that action at this time.
0 commit comments