Example #1
0
 /**
  * @magentoDataFixture Magento/Catalog/_files/product_with_image.php
  */
 public function testThumbnail()
 {
     \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND);
     $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Catalog\\Model\\Product');
     $product->load(1);
     $size = $this->_block->getThumbnailSize();
     $this->assertGreaterThan(1, $size);
     $this->assertContains('/' . $size, $this->_block->getThumbnailUrl($product));
     $this->assertStringEndsWith('magento_image.jpg', $this->_block->getThumbnailUrl($product));
 }