Пример #1
0
 function restore()
 {
     if (!isset($_REQUEST['sid'])) {
         die('SID Required');
     }
     $sid = $_REQUEST['sid'];
     $this->history->restoreByTimestamp($sid);
 }
Пример #2
0
 public function testAppendAndRestore()
 {
     $time = $this->_history->append($this->_path);
     $this->assertTrue(file_exists($this->_history->getFileByTimestamp($time)), '->append() creates history file');
     $this->assertEquals($this->_history->restoreByTimestamp($time), $time, '->restoreByTimestamp() returns correct timestamp');
 }