Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
NewProductTest.php
Go to the documentation of this file.
1 <?php
7 
8 class NewProductTest extends \PHPUnit\Framework\TestCase
9 {
13  protected $block;
14 
15  protected function setUp()
16  {
17  $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
18  $this->block = $objectManager->getObject(\Magento\Catalog\Block\Product\NewProduct::class);
19  }
20 
21  protected function tearDown()
22  {
23  $this->block = null;
24  }
25 
26  public function testGetIdentities()
27  {
28  $this->assertEquals([\Magento\Catalog\Model\Product::CACHE_TAG], $this->block->getIdentities());
29  }
30 
31  public function testScope()
32  {
33  $this->assertFalse($this->block->isScopePrivate());
34  }
35 }
$objectManager
Definition: bootstrap.php:17