Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConfigFilePoolTest.php
Go to the documentation of this file.
1 <?php
8 
10 
11 class ConfigFilePoolTest extends \PHPUnit\Framework\TestCase
12 {
16  private $configFilePool;
17 
18  protected function setUp()
19  {
20  $newPath = [
21  'new_key' => 'new_config.php'
22  ];
23  $this->configFilePool = new ConfigFilePool($newPath);
24  }
25 
26  public function testGetPaths()
27  {
28  $expected['new_key'] = 'new_config.php';
29  $expected[ConfigFilePool::APP_CONFIG] = 'config.php';
30  $expected[ConfigFilePool::APP_ENV] = 'env.php';
31 
32  $this->assertEquals($expected, $this->configFilePool->getPaths());
33  }
34 
35  public function testGetPath()
36  {
37  $expected = 'config.php';
38  $this->assertEquals($expected, $this->configFilePool->getPath(ConfigFilePool::APP_CONFIG));
39  }
40 
45  public function testGetPathException()
46  {
47  $fileKey = 'not_existing';
48  $this->configFilePool->getPath($fileKey);
49  }
50 }