/** * 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); }
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); }
static function setUpBeforeClass() { parent::setUpBeforeClass(); xlite_restore_sql_from_backup(); }
/** * Restore database from the backup * * @since 1.0.0 */ protected function restoreDBState() { xlite_restore_sql_from_backup(); sleep(1); }