Exemplo n.º 1
0
 public function testToHtmlPreviewImageUrl()
 {
     /** @var $objectManager \Magento\TestFramework\ObjectManager */
     $this->_theme->setType(\Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL);
     $this->_theme->setPreviewImage('preview_image_test.jpg');
     $this->_block->setArea('adminhtml');
     $html = $this->_block->toHtml();
     preg_match_all('/pub\\/static\\/adminhtml\\/_view\\/en_US/', $html, $result);
     $this->assertEmpty($result[0]);
 }
Exemplo n.º 2
0
 public function testToHtmlPreviewImageNote()
 {
     /** @var $objectManager \Magento\TestFramework\ObjectManager */
     $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
     $objectManager->get('Magento\\Framework\\Registry')->register('current_theme', $this->_theme);
     $this->_block->setArea('adminhtml');
     $this->_block->toHtml();
     $noticeText = $this->_block->getForm()->getElement('preview_image')->getNote();
     $this->assertNotEmpty($noticeText);
 }