Skip to content

Commit a3dd46b

Browse files
ShradddhaShradddha
authored andcommitted
AC-12092:: Remove Deprecations- PhpUnit10 Unit Tests
1 parent 547296b commit a3dd46b

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/InventoryTest.php

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,10 @@ public function testGetFieldValue($stockId, $methods, $result)
255255
$websiteId = 15;
256256
$fieldName = 'field';
257257

258-
$stockItemMock = $this->getMockForAbstractClass(
259-
StockItemInterface::class,
260-
[],
261-
'',
262-
false,
263-
false,
264-
false,
265-
$methods
266-
);
258+
$stockItemMock = $this->getMockBuilder(StockItemInterface::class)
259+
->disableOriginalConstructor()
260+
->addMethods($methods)
261+
->getMockForAbstractClass();
267262
$productMock = $this->createMock(Product::class);
268263
$storeMock = $this->createMock(Store::class);
269264
$productMock->expects($this->once())
@@ -318,15 +313,10 @@ public function testGetConfigFieldValue($stockId, $methods, $result)
318313
$websiteId = 15;
319314
$fieldName = 'field';
320315

321-
$stockItemMock = $this->getMockForAbstractClass(
322-
StockItemInterface::class,
323-
[],
324-
'',
325-
false,
326-
false,
327-
false,
328-
$methods
329-
);
316+
$stockItemMock = $this->getMockBuilder(StockItemInterface::class)
317+
->disableOriginalConstructor()
318+
->addMethods($methods)
319+
->getMockForAbstractClass();
330320
$productMock = $this->createMock(Product::class);
331321
$storeMock = $this->createMock(Store::class);
332322
$productMock->expects($this->once())
@@ -516,10 +506,10 @@ public static function dataProviderModuleEnabled()
516506
{
517507
return [
518508
[
519-
'ModuleEnabled' => true,
509+
'moduleEnabled' => true,
520510
],
521511
[
522-
'ModuleEnabled' => false
512+
'moduleEnabled' => false
523513
]
524514
];
525515
}

0 commit comments

Comments
 (0)