Zephir\Test\ConfigTest::testSaveOnExit PHP Метод

testSaveOnExit() публичный Метод

Test saveOnExit method.
public testSaveOnExit ( )
    public function testSaveOnExit()
    {
        chdir(sys_get_temp_dir());
        $config = new Config();
        $config->set('name', 'foo');
        $config->saveOnExit();
        $configJson = json_decode(file_get_contents('config.json'), true);
        $this->assertInternalType('array', $configJson);
        $this->assertSame($configJson['name'], 'foo');
        $this->cleanTmpConfigFile();
    }