| Total Complexity | 2 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | class ConfigurationTest extends TestCase |
||
| 26 | { |
||
| 27 | public function testProcess(): void |
||
| 28 | { |
||
| 29 | $cachePath = sys_get_temp_dir().'/dotfiles/test/cache/config.php'; |
||
| 30 | if (is_file($cachePath)) { |
||
| 31 | unlink($cachePath); |
||
| 32 | } |
||
| 33 | $config = new Config(); |
||
| 34 | $config->addDefinition(new Configuration()); |
||
| 35 | $config->addConfigDir(__DIR__.'/fixtures'); |
||
| 36 | $config->setCachePath($cachePath); |
||
| 37 | $config->loadConfiguration(); |
||
| 38 | $processed = $config->getAll(); |
||
| 39 | |||
| 40 | $this->assertTrue($processed['phpbrew']['set_prompt']); |
||
| 41 | $this->assertArrayHasKey('machines', $processed['phpbrew']); |
||
| 42 | } |
||
| 44 |