public function testSetGetProduct() { $this->assertSame($this->_product, $this->_block->getProduct()); $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Catalog\\Model\\Product'); $this->_block->setProduct($product); $this->assertSame($product, $this->_block->getProduct()); }
/** * @magentoDataFixture Magento/Catalog/_files/product_simple.php */ public function testSetGetProduct() { $this->assertSame($this->product, $this->block->getProduct()); $product = $this->objectManager->create('Magento\\Catalog\\Model\\Product'); $this->block->setProduct($product); $this->assertSame($product, $this->block->getProduct()); }