/** * @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()); }
/** * @return string */ public function getImageHtmlTemplate() { return $this->imageHelper->getFrame() ? 'Magento_Catalog/product/image' : 'Magento_Catalog/product/image_with_borders'; }