function restore() { if (!isset($_REQUEST['sid'])) { die('SID Required'); } $sid = $_REQUEST['sid']; $this->history->restoreByTimestamp($sid); }
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'); }