Skip to content

Commit b24088b

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

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,8 @@ public function testGetIdentities(
838838
$this->assertEquals($expected, $this->model->getIdentities());
839839
}
840840

841-
protected function getMockForExtensionAttribute() {
841+
protected function getMockForExtensionAttribute()
842+
{
842843
$extensionAttributesMock = $this->getMockBuilder(ExtensionAttributesInterface::class)
843844
->disableOriginalConstructor()
844845
->addMethods(['getStockItem'])
@@ -849,23 +850,18 @@ protected function getMockForExtensionAttribute() {
849850
$extensionAttributesMock->expects($this->any())->method('getStockItem')->willReturn($stockItemMock);
850851
return $extensionAttributesMock;
851852
}
852-
853-
protected function getMockForStockInterface() {
854-
$stockItemMock = $this->getMockBuilder(StockItemInterface::class)
855-
->disableOriginalConstructor()
856-
->getMockForAbstractClass();
857-
$stockItemMock->expects($this->any())->method('getIsInStock')->willReturn(true);
858-
}
859-
860853
/**
861854
* @return array
862855
*/
863856
public static function getIdentitiesProvider(): array
864857
{
865858
$extensionAttributesMock = static fn (self $testCase)
866859
=> $testCase->getMockForExtensionAttribute();
867-
$stockItemMock = static fn (self $testCase)
868-
=> $testCase->getMockForStockInterface();
860+
/** Unused lines of code */
861+
// $stockItemMock = $this->getMockBuilder(StockItemInterface::class)
862+
// ->disableOriginalConstructor()
863+
// ->getMockForAbstractClass();
864+
// $stockItemMock->expects($this->any())->method('getIsInStock')->willReturn(true);
869865

870866
return [
871867
'no changes' => [

0 commit comments

Comments
 (0)