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
151151 ->disableOriginalConstructor ()
152152 ->getMockForAbstractClass ();
153153 $ productExtensionAttributes = $ this ->getMockBuilder (ProductExtensionInterface::class)
154- ->addMethods (['getCategoryLinks ' , 'setCategoryLinks ' ])
154+ ->onlyMethods (['getCategoryLinks ' , 'setCategoryLinks ' ])
155155 ->getMockForAbstractClass ();
156156 $ this ->productMock ->setExtensionAttributes ($ productExtensionAttributes );
157157
@@ -788,6 +788,6 @@ private function prepareObjectManager($map)
788788
789789 $ reflectionProperty = new \ReflectionProperty (\Magento \Framework \App \ObjectManager::class, '_instance ' );
790790 $ reflectionProperty ->setAccessible (true );
791- $ reflectionProperty ->setValue ($ objectManagerMock , null );
791+ $ reflectionProperty ->setValue ($ objectManagerMock , $ objectManagerMock );
792792 }
793793}
Original file line number Diff line number Diff line change @@ -380,6 +380,6 @@ public function prepareObjectManager(array $map = [])
380380
381381 $ reflectionProperty = new \ReflectionProperty (AppObjectManager::class, '_instance ' );
382382 $ reflectionProperty ->setAccessible (true );
383- $ reflectionProperty ->setValue ($ objectManagerMock , null );
383+ $ reflectionProperty ->setValue ($ objectManagerMock , $ objectManagerMock );
384384 }
385385}
You can’t perform that action at this time.
0 commit comments