예제 #1
0
 /**
  * @param array $data
  * @dataProvider getFrameDataProvider
  */
 public function testGetFrame($data)
 {
     $imageId = 'test_image_id';
     $attributes = [];
     $productMock = $this->getMockBuilder('Magento\\Catalog\\Model\\Product')->disableOriginalConstructor()->getMock();
     $this->prepareAttributes($data, $imageId);
     $this->helper->init($productMock, $imageId, $attributes);
     $this->assertEquals($data['frame'], $this->helper->getFrame());
 }
예제 #2
0
 /**
  * @return string
  */
 public function getImageHtmlTemplate()
 {
     return $this->imageHelper->getFrame() ? 'Magento_Catalog/product/image' : 'Magento_Catalog/product/image_with_borders';
 }