Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ArrayScannerTest.php
Go to the documentation of this file.
1 <?php
7 
8 class ArrayScannerTest extends \PHPUnit\Framework\TestCase
9 {
13  protected $_model;
14 
18  protected $_testDir;
19 
20  protected function setUp()
21  {
22  $this->_model = new \Magento\Setup\Module\Di\Code\Scanner\ArrayScanner();
23  $this->_testDir = str_replace('\\', '/', realpath(__DIR__ . '/../../') . '/_files');
24  }
25 
26  public function testCollectEntities()
27  {
28  $actual = $this->_model->collectEntities([$this->_testDir . '/additional.php']);
29  $expected = ['Some_Model_Proxy', 'Some_Model_EntityFactory'];
30  $this->assertEquals($expected, $actual);
31  }
32 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60