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();
}