Пример #1
0
 /**
  * Restore database from common backup
  *
  * @return void
  * @access protected
  * @see    ____func_see____
  * @since  1.0.0
  */
 protected function doRestoreDb($path = null, $drop = true, $doNotAssert = false)
 {
     $message = '';
     $result = xlite_restore_sql_from_backup($path, false, $drop, $message);
     if (!$doNotAssert) {
         $this->assertTrue($result, $message);
     }
     \Includes\Utils\FileManager::copyRecursive(LC_DIR . '/.dev/tests/images', LC_DIR_IMAGES);
 }
Пример #2
0
 public function reset()
 {
     if ($this->block_all == ResourcePool::RESOURCE_RESERVED) {
         throw new Exception("There is block resource");
     }
     if (array_search(ResourcePool::RESOURCE_RESERVED, $this->resources) !== false) {
         print_r($this->resources);
         throw new Exception("There is some reserved or used resources");
     }
     $this->resources = array();
     $this->used = array();
     $this->block_all = false;
     xlite_restore_sql_from_backup();
     sleep(2);
 }
Пример #3
0
 static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     xlite_restore_sql_from_backup();
 }
Пример #4
0
 /**
  * Restore database from the backup
  *
  * @since 1.0.0
  */
 protected function restoreDBState()
 {
     xlite_restore_sql_from_backup();
     sleep(1);
 }