Skip to content

Commit 1c8dec6

Browse files
committed
MAGETWO-65480: [Backport] - [Performance] Image metadata caching - for 2.1.6
1 parent 47dbb1a commit 1c8dec6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*/
66
namespace Magento\Catalog\Test\Unit\Block\Product\View;
77

8+
use Magento\Catalog\Block\Product\ImageBlockBuilder;
9+
use Magento\Framework\App\ObjectManager;
10+
811
class GalleryTest extends \PHPUnit_Framework_TestCase
912
{
1013
/**
@@ -49,6 +52,15 @@ protected function setUp()
4952
->disableOriginalConstructor()
5053
->getMock();
5154

55+
$objectManager = $this->getMockBuilder(ObjectManager::class)
56+
->disableOriginalConstructor()
57+
->getMock();
58+
$imageBlockBuilder = $this->getMockBuilder(ImageBlockBuilder::class)
59+
->disableOriginalConstructor()
60+
->getMock();
61+
$objectManager->expects($this->once())->method('get')->willReturn($imageBlockBuilder);
62+
ObjectManager::setInstance($objectManager);
63+
5264
$this->model = new \Magento\Catalog\Block\Product\View\Gallery(
5365
$this->context,
5466
$this->arrayUtils,

0 commit comments

Comments
 (0)