/** * Test to get valid html code for 'image' with placeholder */ public function testImagePlaceholder() { $urlPath = 'http://example.com/pub/images/image-placeholder.png'; $this->_block->setValue(null); $this->_coreHelper->expects($this->any())->method('escapeHtml')->will($this->returnArgument(0)); $html = $this->_createHtmlCode('', $urlPath); $this->assertXmlStringEqualsXmlString(str_replace('×', '&times;', "<test>{$html}</test>"), str_replace('×', '&times;', "<test>{$this->_block->getElementHtml()}</test>"), 'Another BaseImage html code is expected'); }
/** * Test to get valid html code for 'image' with placeholder */ public function testImagePlaceholder() { $urlPath = 'http://example.com/pub/images/image-placeholder.png'; $this->_model->setValue(null); $this->_design->expects($this->once())->method('getViewFileUrl')->will($this->returnValue($urlPath)); $this->_helperData->expects($this->any())->method('escapeHtml')->will($this->returnArgument(0)); $html = $this->_createHtmlCode('', $urlPath); $this->assertXmlStringEqualsXmlString("<test>{$html}</test>", "<test>{$this->_model->getElementHtml()}</test>", 'Another BaseImage html code is expected'); }