File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
app/code/Magento/Catalog/Test/Unit/Block/Product/View Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Catalog \Test \Unit \Block \Product \View ;
7
7
8
+ use Magento \Catalog \Block \Product \ImageBlockBuilder ;
9
+ use Magento \Framework \App \ObjectManager ;
10
+
8
11
class GalleryTest extends \PHPUnit_Framework_TestCase
9
12
{
10
13
/**
@@ -49,6 +52,15 @@ protected function setUp()
49
52
->disableOriginalConstructor ()
50
53
->getMock ();
51
54
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
+
52
64
$ this ->model = new \Magento \Catalog \Block \Product \View \Gallery (
53
65
$ this ->context ,
54
66
$ this ->arrayUtils ,
You can’t perform that action at this time.
0 commit comments