Skip to content

Commit d456434

Browse files
author
cspruiell
committed
MAGETWO-69397: Hidden product images are not hidden from category listing or product view
- support custom placeholder images
1 parent a567d99 commit d456434

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

app/code/Magento/Catalog/Test/Unit/Helper/ImageTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ class ImageTest extends \PHPUnit_Framework_TestCase
4242
*/
4343
protected $scopeConfig;
4444

45+
/**
46+
* @var \Magento\Catalog\Model\View\Asset\PlaceholderFactory|\PHPUnit_Framework_MockObject_MockObject
47+
*/
48+
protected $placeholderFactory;
49+
4550
protected function setUp()
4651
{
4752
$this->mockContext();
@@ -54,11 +59,16 @@ protected function setUp()
5459
$this->viewConfig = $this->getMockBuilder(\Magento\Framework\View\ConfigInterface::class)
5560
->getMockForAbstractClass();
5661

62+
$this->placeholderFactory = $this->getMockBuilder(\Magento\Catalog\Model\View\Asset\PlaceholderFactory::class)
63+
->disableOriginalConstructor()
64+
->getMock();
65+
5766
$this->helper = new \Magento\Catalog\Helper\Image(
5867
$this->context,
5968
$this->imageFactory,
6069
$this->assetRepository,
61-
$this->viewConfig
70+
$this->viewConfig,
71+
$this->placeholderFactory
6272
);
6373
}
6474

0 commit comments

Comments
 (0)