Skip to content

Commit 689e8d7

Browse files
ACPT-1552
fixing unit test failure
1 parent 04313b2 commit 689e8d7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/ConfigurableProductGraphQl/Test/Unit/Model/Cart/BuyRequest/SuperAttributeDataProviderTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Magento\Framework\EntityManager\EntityMetadataInterface;
1717
use Magento\Framework\EntityManager\MetadataPool;
1818
use Magento\Framework\Stdlib\ArrayManager;
19+
use Magento\Framework\Stdlib\ArrayManagerFactory;
1920
use Magento\Quote\Model\Quote;
2021
use Magento\Store\Model\Store;
2122
use PHPUnit\Framework\MockObject\MockObject;
@@ -66,13 +67,15 @@ protected function setUp(): void
6667
$this->optionCollection = $this->createMock(OptionCollection::class);
6768
$this->metadataPool = $this->createMock(MetadataPool::class);
6869
$this->stockState = $this->createMock(StockStateInterface::class);
69-
70+
$arrayManagerFactory = $this->createMock(ArrayManagerFactory::class);
71+
$arrayManagerFactory->method('create')->willReturn($this->arrayManager);
7072
$this->superAttributeDataProvider = new SuperAttributeDataProvider(
7173
$this->arrayManager,
7274
$this->productRepository,
7375
$this->optionCollection,
7476
$this->metadataPool,
75-
$this->stockState
77+
$this->stockState,
78+
$arrayManagerFactory,
7679
);
7780
}
7881

@@ -150,7 +153,6 @@ public function testExecute(): void
150153
'values' => [['value_index' => 1]],
151154
]
152155
]);
153-
154156
$this->assertEquals(['super_attribute' => [1 => 1]], $this->superAttributeDataProvider->execute($cartItemData));
155157
}
156158
}

0 commit comments

Comments
 (0)