Пример #1
0
 protected function teardown()
 {
     Config::restore($this->_backup);
     foreach (glob($this->_objects . '/*') as $file) {
         unlink($file);
     }
 }
Пример #2
0
 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'));
 }
Пример #3
0
 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);
         }
     }
 }