Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
EntitySpecificHandlesListTest.php
Go to the documentation of this file.
1 <?php
8 
10 
11 class EntitySpecificHandlesListTest extends \PHPUnit\Framework\TestCase
12 {
16  private $entitySpecificHandlesList;
17 
18  protected function setUp()
19  {
20  $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
21  $this->entitySpecificHandlesList = $objectManager->getObject(EntitySpecificHandlesList::class);
22  }
23 
24  public function testAddAndGetHandles()
25  {
26  $this->assertEquals([], $this->entitySpecificHandlesList->getHandles());
27  $this->entitySpecificHandlesList->addHandle('handle1');
28  $this->entitySpecificHandlesList->addHandle('handle2');
29  $this->assertEquals(['handle1', 'handle2'], $this->entitySpecificHandlesList->getHandles());
30  }
31 }
$objectManager
Definition: bootstrap.php:17