예제 #1
0
파일: NewTest.php 프로젝트: relue/magento2
 public function testToHtml()
 {
     $this->assertEmpty($this->_block->getProductCollection());
     $this->_block->setProductsCount(5);
     $this->_block->setTemplate('product/widget/new/content/new_list.phtml');
     $this->_block->setLayout(new Mage_Core_Model_Layout());
     $html = $this->_block->toHtml();
     $this->assertNotEmpty($html);
     $this->assertContains('New Product', $html);
     $this->assertInstanceOf('Mage_Catalog_Model_Resource_Product_Collection', $this->_block->getProductCollection());
 }