File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Initialization
lib/internal/Magento/Framework/TestFramework/Unit/Helper Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ protected function setUp(): void
151
151
->disableOriginalConstructor ()
152
152
->getMockForAbstractClass ();
153
153
$ productExtensionAttributes = $ this ->getMockBuilder (ProductExtensionInterface::class)
154
- ->addMethods (['getCategoryLinks ' , 'setCategoryLinks ' ])
154
+ ->onlyMethods (['getCategoryLinks ' , 'setCategoryLinks ' ])
155
155
->getMockForAbstractClass ();
156
156
$ this ->productMock ->setExtensionAttributes ($ productExtensionAttributes );
157
157
@@ -788,6 +788,6 @@ private function prepareObjectManager($map)
788
788
789
789
$ reflectionProperty = new \ReflectionProperty (\Magento \Framework \App \ObjectManager::class, '_instance ' );
790
790
$ reflectionProperty ->setAccessible (true );
791
- $ reflectionProperty ->setValue ($ objectManagerMock , null );
791
+ $ reflectionProperty ->setValue ($ objectManagerMock , $ objectManagerMock );
792
792
}
793
793
}
Original file line number Diff line number Diff line change @@ -380,6 +380,6 @@ public function prepareObjectManager(array $map = [])
380
380
381
381
$ reflectionProperty = new \ReflectionProperty (AppObjectManager::class, '_instance ' );
382
382
$ reflectionProperty ->setAccessible (true );
383
- $ reflectionProperty ->setValue ($ objectManagerMock , null );
383
+ $ reflectionProperty ->setValue ($ objectManagerMock , $ objectManagerMock );
384
384
}
385
385
}
You can’t perform that action at this time.
0 commit comments