Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
TreeBuilderTest.php
Go to the documentation of this file.
1 <?php
7 
8 class TreeBuilderTest extends \PHPUnit\Framework\TestCase
9 {
13  protected $_model;
14 
20  protected $_fixturePath;
21 
22  protected function setUp()
23  {
24  $this->_model = new \Magento\Framework\Acl\AclResource\TreeBuilder();
25  $this->_fixturePath = realpath(__DIR__ . '/../') . '/_files/';
26  }
27 
28  public function testBuild()
29  {
30  $resourceList = require $this->_fixturePath . 'resourceList.php';
31  $actual = require $this->_fixturePath . 'result.php';
32  $expected = $this->_model->build($resourceList);
33  $this->assertEquals($actual, $expected);
34  }
35 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60