coreConfigFile = DI()->config; } protected function tearDown() { } public function testConstruct() { $config = new PhalApi_Config_File(dirname(__FILE__) . '/Config'); } /** * @group testGet */ public function testGetDefault() { $key = 'sys.noThisKey'; $default = 2014; $rs = $this->coreConfigFile->get($key, $default); $this->assertSame($default, $rs); } public function testGetNormal() { $key = 'sys.debug'; $rs = $this->coreConfigFile->get($key); $this->assertFalse($rs); } public function testGetAll() { $key = 'dbs'; $rs = $this->coreConfigFile->get($key); $this->assertTrue(is_array($rs)); } }