File tree Expand file tree Collapse file tree 5 files changed +12
-12
lines changed
ConfigurableProduct/Test/Unit/Model Expand file tree Collapse file tree 5 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 66
77namespace Magento \Catalog \Test \Unit \Model \Product ;
88
9- use Magento \Catalog \Api \Data \ProductExtension ;
9+ use Magento \Catalog \Api \Data \ProductExtensionInterface ;
1010use Magento \Catalog \Api \Data \ProductInterface ;
1111use Magento \Catalog \Model \Attribute \ScopeOverriddenValue ;
1212use Magento \Catalog \Model \Product ;
@@ -106,9 +106,9 @@ protected function setUp()
106106 public function testCopy (): void
107107 {
108108 $ stockItem = $ this ->createMock (StockItemInterface::class);
109- $ extensionAttributes = $ this ->getMockBuilder (ProductExtension ::class)
109+ $ extensionAttributes = $ this ->getMockBuilder (ProductExtensionInterface ::class)
110110 ->setMethods (['getStockItem ' , 'setData ' ])
111- ->getMock ();
111+ ->getMockForAbstractClass ();
112112 $ extensionAttributes
113113 ->expects ($ this ->once ())
114114 ->method ('getStockItem ' )
@@ -262,9 +262,9 @@ public function testUrlAlreadyExistsExceptionWhileCopyStoresUrl(): void
262262 {
263263 $ stockItem = $ this ->getMockBuilder (StockItemInterface::class)
264264 ->getMock ();
265- $ extensionAttributes = $ this ->getMockBuilder (ProductExtension ::class)
265+ $ extensionAttributes = $ this ->getMockBuilder (ProductExtensionInterface ::class)
266266 ->setMethods (['getStockItem ' , 'setData ' ])
267- ->getMock ();
267+ ->getMockForAbstractClass ();
268268 $ extensionAttributes
269269 ->expects ($ this ->once ())
270270 ->method ('getStockItem ' )
Original file line number Diff line number Diff line change 66
77namespace Magento \Catalog \Test \Unit \Model \Product \Website ;
88
9- use Magento \Catalog \Api \Data \ProductExtension ;
9+ use Magento \Catalog \Api \Data \ProductExtensionInterface ;
1010use Magento \Catalog \Model \Product ;
1111use Magento \Catalog \Model \Product \Website \ReadHandler ;
1212use Magento \Catalog \Model \ResourceModel \Product as ResourceModel ;
@@ -27,10 +27,10 @@ public function setUp()
2727 $ this ->websiteLink = $ this ->getMockBuilder (ResourceModel \Website \Link::class)
2828 ->disableOriginalConstructor ()
2929 ->getMock ();
30- $ this ->extensionAttributes = $ this ->getMockBuilder (ProductExtension ::class)
30+ $ this ->extensionAttributes = $ this ->getMockBuilder (ProductExtensionInterface ::class)
3131 ->setMethods (['setWebsiteIds ' , 'getWebsiteIds ' ])
3232 ->disableArgumentCloning ()
33- ->getMock ();
33+ ->getMockForAbstractClass ();
3434 $ this ->readHandler = new ReadHandler ($ this ->websiteLink );
3535 }
3636
Original file line number Diff line number Diff line change 66
77namespace Magento \Catalog \Test \Unit \Model \Product \Website ;
88
9- use Magento \Catalog \Api \Data \ProductExtension ;
9+ use Magento \Catalog \Api \Data \ProductExtensionInterface ;
1010use Magento \Catalog \Api \Data \ProductInterface ;
1111use Magento \Catalog \Model \ResourceModel \Product \Website \Link ;
1212use Magento \Catalog \Model \Product \Website \SaveHandler ;
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ class ProductRepositoryTest extends TestCase
175175 /**
176176 * @var ProductExtensionInterface|MockObject
177177 */
178- private $ productExtension ;
178+ private $ ProductExtensionInterface ;
179179
180180 /**
181181 * @var Json|MockObject
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ public function testAddChild()
149149 ->disableOriginalConstructor ()
150150 ->setMethods (['getId ' , 'getData ' ])
151151 ->getMock ();
152- $ extensionAttributesMock = $ this ->getMockBuilder (\Magento \Catalog \Api \Data \ProductExtension ::class)
152+ $ extensionAttributesMock = $ this ->getMockBuilder (\Magento \Catalog \Api \Data \ProductExtensionInterface ::class)
153153 ->disableOriginalConstructor ()
154154 ->setMethods (
155155 [
@@ -158,7 +158,7 @@ public function testAddChild()
158158 'setConfigurableProductLinks '
159159 ]
160160 )
161- ->getMock ();
161+ ->getMockForAbstractClass ();
162162 $ optionMock = $ this ->getMockBuilder (\Magento \ConfigurableProduct \Api \Data \Option::class)
163163 ->disableOriginalConstructor ()
164164 ->setMethods (['getProductAttribute ' , 'getPosition ' , 'getAttributeId ' ])
You can’t perform that action at this time.
0 commit comments