protected function teardown() { Config::restore($this->_backup); foreach (glob($this->_objects . '/*') as $file) { unlink($file); } }
public function testRestore() { Config::set('index', 'page1'); $backup = Config::backup(); Config::set('index', 'page2'); $this->assertEquals('page2', Config::get('index')); Config::restore($backup); $this->assertEquals('page1', Config::get('index')); }
protected function tearDown() { Config::restore($this->_backup); foreach (glob($this->_pages . '/*/*') as $file) { unlink($file); } foreach (glob($this->_pages . '/*') as $file) { if (is_file($file)) { unlink($file); } } }