Skip to content

Commit 544ac09

Browse files
committed
MAGETWO-93258: [Forwardport] Optimize retrieving product attributes
1 parent f9b2a88 commit 544ac09

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ class ProductTest extends \PHPUnit\Framework\TestCase
7979
*/
8080
protected $_priceInfoMock;
8181

82+
/**
83+
* @var \Magento\CatalogInventory\Model\FilterCustomAttribute|\PHPUnit_Framework_MockObject_MockObject
84+
*/
85+
private $filterCustomAttribute;
86+
8287
/**
8388
* @var \Magento\Store\Model\Store|\PHPUnit_Framework_MockObject_MockObject
8489
*/
@@ -375,6 +380,10 @@ protected function setUp()
375380
->method('create')
376381
->willReturn($this->extensionAttributes);
377382

383+
$this->filterCustomAttribute = $this->createTestProxy(
384+
\Magento\CatalogInventory\Model\FilterCustomAttribute::class
385+
);
386+
378387
$this->objectManagerHelper = new ObjectManagerHelper($this);
379388
$this->model = $this->objectManagerHelper->getObject(
380389
\Magento\Catalog\Model\Product::class,
@@ -404,7 +413,8 @@ protected function setUp()
404413
'_filesystem' => $this->filesystemMock,
405414
'_collectionFactory' => $this->collectionFactoryMock,
406415
'data' => ['id' => 1],
407-
'eavConfig' => $this->eavConfig
416+
'eavConfig' => $this->eavConfig,
417+
'filterCustomAttribute' => $this->filterCustomAttribute
408418
]
409419
);
410420
}

0 commit comments

Comments
 (0)