/** * Application constructor. * @param $argv array CLI arguments */ public function __construct($argv) { $this->config = new Config(new Parser(), new FileLoader()); $this->argParser = new ArgvParser($argv); $configFile = $this->argParser->get('config'); if (file_exists($configFile) && is_readable($configFile)) { $this->config->loadData($configFile); } }
/** @test */ public function shouldReturnFalseOnNonExistentSectionEntry() { $config = new Config($this->parserMock, $this->loader); $config->loadData('tests/data/config-test.yml'); $this->assertEquals(null, $config->getEntry('non-existent-section.path')); }