File tree 5 files changed +12
-12
lines changed
ConfigurableProduct/Test/Unit/Model
5 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Catalog \Test \Unit \Model \Product ;
8
8
9
- use Magento \Catalog \Api \Data \ProductExtension ;
9
+ use Magento \Catalog \Api \Data \ProductExtensionInterface ;
10
10
use Magento \Catalog \Api \Data \ProductInterface ;
11
11
use Magento \Catalog \Model \Attribute \ScopeOverriddenValue ;
12
12
use Magento \Catalog \Model \Product ;
@@ -106,9 +106,9 @@ protected function setUp()
106
106
public function testCopy (): void
107
107
{
108
108
$ stockItem = $ this ->createMock (StockItemInterface::class);
109
- $ extensionAttributes = $ this ->getMockBuilder (ProductExtension ::class)
109
+ $ extensionAttributes = $ this ->getMockBuilder (ProductExtensionInterface ::class)
110
110
->setMethods (['getStockItem ' , 'setData ' ])
111
- ->getMock ();
111
+ ->getMockForAbstractClass ();
112
112
$ extensionAttributes
113
113
->expects ($ this ->once ())
114
114
->method ('getStockItem ' )
@@ -262,9 +262,9 @@ public function testUrlAlreadyExistsExceptionWhileCopyStoresUrl(): void
262
262
{
263
263
$ stockItem = $ this ->getMockBuilder (StockItemInterface::class)
264
264
->getMock ();
265
- $ extensionAttributes = $ this ->getMockBuilder (ProductExtension ::class)
265
+ $ extensionAttributes = $ this ->getMockBuilder (ProductExtensionInterface ::class)
266
266
->setMethods (['getStockItem ' , 'setData ' ])
267
- ->getMock ();
267
+ ->getMockForAbstractClass ();
268
268
$ extensionAttributes
269
269
->expects ($ this ->once ())
270
270
->method ('getStockItem ' )
Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Catalog \Test \Unit \Model \Product \Website ;
8
8
9
- use Magento \Catalog \Api \Data \ProductExtension ;
9
+ use Magento \Catalog \Api \Data \ProductExtensionInterface ;
10
10
use Magento \Catalog \Model \Product ;
11
11
use Magento \Catalog \Model \Product \Website \ReadHandler ;
12
12
use Magento \Catalog \Model \ResourceModel \Product as ResourceModel ;
@@ -27,10 +27,10 @@ public function setUp()
27
27
$ this ->websiteLink = $ this ->getMockBuilder (ResourceModel \Website \Link::class)
28
28
->disableOriginalConstructor ()
29
29
->getMock ();
30
- $ this ->extensionAttributes = $ this ->getMockBuilder (ProductExtension ::class)
30
+ $ this ->extensionAttributes = $ this ->getMockBuilder (ProductExtensionInterface ::class)
31
31
->setMethods (['setWebsiteIds ' , 'getWebsiteIds ' ])
32
32
->disableArgumentCloning ()
33
- ->getMock ();
33
+ ->getMockForAbstractClass ();
34
34
$ this ->readHandler = new ReadHandler ($ this ->websiteLink );
35
35
}
36
36
Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Catalog \Test \Unit \Model \Product \Website ;
8
8
9
- use Magento \Catalog \Api \Data \ProductExtension ;
9
+ use Magento \Catalog \Api \Data \ProductExtensionInterface ;
10
10
use Magento \Catalog \Api \Data \ProductInterface ;
11
11
use Magento \Catalog \Model \ResourceModel \Product \Website \Link ;
12
12
use Magento \Catalog \Model \Product \Website \SaveHandler ;
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ class ProductRepositoryTest extends TestCase
175
175
/**
176
176
* @var ProductExtensionInterface|MockObject
177
177
*/
178
- private $ productExtension ;
178
+ private $ ProductExtensionInterface ;
179
179
180
180
/**
181
181
* @var Json|MockObject
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ public function testAddChild()
149
149
->disableOriginalConstructor ()
150
150
->setMethods (['getId ' , 'getData ' ])
151
151
->getMock ();
152
- $ extensionAttributesMock = $ this ->getMockBuilder (\Magento \Catalog \Api \Data \ProductExtension ::class)
152
+ $ extensionAttributesMock = $ this ->getMockBuilder (\Magento \Catalog \Api \Data \ProductExtensionInterface ::class)
153
153
->disableOriginalConstructor ()
154
154
->setMethods (
155
155
[
@@ -158,7 +158,7 @@ public function testAddChild()
158
158
'setConfigurableProductLinks '
159
159
]
160
160
)
161
- ->getMock ();
161
+ ->getMockForAbstractClass ();
162
162
$ optionMock = $ this ->getMockBuilder (\Magento \ConfigurableProduct \Api \Data \Option::class)
163
163
->disableOriginalConstructor ()
164
164
->setMethods (['getProductAttribute ' , 'getPosition ' , 'getAttributeId ' ])
You can’t perform that action at this time.
0 commit comments