function tearDown() { parent::tearDown(); foreach (array_keys($this->node_object_mocks) as $id) { $this->node_object_mocks[$id]->tally(); } }
public function tearDown() { $this->clear_tables(); Session::instance()->destroy(); Session::instance()->create(); parent::tearDown(); }
public function tearDown() { parent::tearDown(); unset($GLOBALS['sys_force_ssl']); unset($GLOBALS['sys_default_domain']); unset($GLOBALS['sys_https_host']); }
function tearDown() { if (file_exists($this->cache_file)) { unlink($this->cache_file); } parent::tearDown(); }
public function tearDown() { parent::tearDown(); if ($this->newInstanceEachTest) { $this->selenium->stop(); $this->selenium = null; } }
function tearDown() { parent::tearDown(); $_GET = array(); $_POST = array(); $_REQUEST = array(); Piwik_TablePartitioning::$tablesAlreadyInstalled = null; }
public function tearDown() { parent::tearDown(); $return = $this->rawCurl(ROOT_URL . 'tao/test/connector/tearDown.php', array('uri' => $this->userUri)); $this->assertTrue(json_decode($return, true)); /* $this->user->delete(); */ }
/** * Tear down * Destroys Config, Webapp, and Session objects * @TODO Destroy all SESSION variables * @TODO Destroy all REQUEST/GET/POST variables */ function tearDown() { Config::destroyInstance(); Webapp::destroyInstance(); Crawler::destroyInstance(); if (isset($_SESSION['user'])) { $_SESSION['user'] = null; } parent::tearDown(); }
public function tearDown() { parent::tearDown(); Piwik_DataTable_Manager::getInstance()->deleteAll(); Piwik_Option::getInstance()->clearCache(); Piwik_Common::deleteTrackerCache(); Piwik_Site::clearCache(); Piwik::truncateAllTables(); Piwik_TablePartitioning::$tablesAlreadyInstalled = null; }
/** * Tear down * Destroys Config, Webapp, $_SESSION, $_POST, $_GET, $_REQUEST */ public function tearDown() { Config::destroyInstance(); Webapp::destroyInstance(); Crawler::destroyInstance(); if (isset($_SESSION)) { $this->unsetArray($_SESSION); } $this->unsetArray($_POST); $this->unsetArray($_GET); $this->unsetArray($_REQUEST); $this->unsetArray($_SERVER); Loader::unregister(); parent::tearDown(); }
/** * Delete created files and temporary files directory, delete the tables created by setUp(), * and reset the database prefix. */ function tearDown() { global $db_prefix; if (preg_match('/simpletest\\d+/', $db_prefix)) { // Delete temporary files directory and reset files directory path. simpletest_clean_temporary_directory(file_directory_path()); variable_set('file_directory_path', $this->original_file_directory); $schema = drupal_get_schema(NULL, TRUE); $ret = array(); foreach ($schema as $name => $table) { db_drop_table($ret, $name); } $db_prefix = $this->db_prefix_original; $this->_logged_in = FALSE; $this->curlClose(); } parent::tearDown(); }
/** * Method called after each test method. Doesn't do anything extraordinary except restore the global $DB to the real one. */ public function tearDown() { global $DB, $CFG; if (empty($CFG->unittestprefix)) { return; } if (empty($DB)) { $DB = $this->DB; } $DB->cleanup(); parent::tearDown(); // Output buffering if (ob_get_length() > 0) { ob_end_flush(); } }
public function tearDown() { global $SESSION; parent::tearDown(); if ($this->initiallang !== null) { $SESSION->lang = $this->initiallang; $this->initiallang = null; } else { unset($SESSION->lang); } }
public function tearDown() { parent::tearDown(); $_SERVER['HTTP_HOST'] = $this->host; }
function tearDown() { global $CFG; // Restore original file_logger levels if ($this->errorlogloggerlevel !== null) { $CFG->backup_error_log_logger_level = $this->errorlogloggerlevel; } else { unset($CFG->backup_error_log_logger_level); } if ($this->outputindentedloggerlevel !== null) { $CFG->backup_output_indented_logger_level = $this->outputindentedloggerlevel; } else { unset($CFG->backup_output_indented_logger_level); } if ($this->fileloggerlevel !== null) { $CFG->backup_file_logger_level = $this->fileloggerlevel; } else { unset($CFG->backup_file_logger_level); } if ($this->databaseloggerlevel !== null) { $CFG->backup_database_logger_level = $this->databaseloggerlevel; } else { unset($CFG->backup_database_logger_level); } if ($this->fileloggerextra !== null) { $CFG->backup_file_logger_extra = $this->fileloggerextra; } else { unset($CFG->backup_file_logger_extra); } if ($this->fileloggerlevelextra !== null) { $CFG->backup_file_logger_level_extra = $this->fileloggerlevelextra; } else { unset($CFG->backup_file_logger_level_extra); } // Restore the rest of $CFG settings if ($this->debugging !== null) { $CFG->debug = $this->debugging; } else { unset($CFG->debug); } if ($this->debugdisplay !== null) { $CFG->debugdisplay = $this->debugdisplay; } else { unset($CFG->debugdisplay); } parent::tearDown(); }
/** * tearDown method * * @access public * @return void */ function tearDown() { if (file_exists(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_core_paths')) { unlink(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_core_paths'); } if (file_exists(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_dir_map')) { unlink(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_dir_map'); } if (file_exists(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_file_map')) { unlink(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_file_map'); } if (file_exists(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_object_map')) { unlink(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_object_map'); } parent::tearDown(); unset($this->Configure); }
/** * Destroy Config, Webapp, $_SESSION, $_POST, $_GET, $_REQUEST */ public function tearDown() { Config::destroyInstance(); PluginRegistrarWebapp::destroyInstance(); PluginRegistrarCrawler::destroyInstance(); if (isset($_SESSION)) { $this->unsetArray($_SESSION); } $this->unsetArray($_POST); $this->unsetArray($_GET); $this->unsetArray($_REQUEST); $this->unsetArray($_SERVER); $this->unsetArray($_FILES); Loader::unregister(); $backup_dir = FileDataManager::getBackupPath(); if (file_exists($backup_dir)) { try { @exec('cd ' . $backup_dir . '; rm -rf *'); rmdir($backup_dir); // won't delete if has files } catch (Exception $e) { } } $data_dir = FileDataManager::getDataPath(); if (file_exists($data_dir . 'compiled_view')) { try { @exec('cd ' . $data_dir . '; rm -rf compiled_view'); } catch (Exception $e) { } } parent::tearDown(); }
function tearDown() { global $CFG; $CFG->debug = $this->olddebug; parent::tearDown(); }
function tearDown() { $_GET = $this->old_get; $_SERVER = $this->old_server; parent::tearDown(); }
public function tearDown() { ForgeConfig::restore(); parent::tearDown(); }
public function tearDown() { $this->requires = null; parent::tearDown(); }
/** * Revert any changed globals. * @see change_global() * @see change_server() */ function tearDown() { parent::tearDown(); foreach ($this->_saved_globals as $k => $v) { $GLOBALS[$k] = $v; } foreach ($this->_saved_server as $k => $v) { $_SERVER[$k] = $v; } }
function tearDown() { $this->_cleanUp(); $this->conn->disconnect(); parent::tearDown(); }
function tearDown() { global $DB, $CFG; // Delete all the records marked to foreach ($this->todelete as $todelete) { $DB->delete_records($todelete[0], array('id' => $todelete[1])); } // Restore original file_logger levels if ($this->errorlogloggerlevel !== null) { $CFG->backup_error_log_logger_level = $this->errorlogloggerlevel; } else { unset($CFG->backup_error_log_logger_level); } if ($this->outputindentedloggerlevel !== null) { $CFG->backup_output_indented_logger_level = $this->outputindentedloggerlevel; } else { unset($CFG->backup_output_indented_logger_level); } if ($this->fileloggerlevel !== null) { $CFG->backup_file_logger_level = $this->fileloggerlevel; } else { unset($CFG->backup_file_logger_level); } if ($this->databaseloggerlevel !== null) { $CFG->backup_database_logger_level = $this->databaseloggerlevel; } else { unset($CFG->backup_database_logger_level); } if ($this->fileloggerextra !== null) { $CFG->backup_file_logger_extra = $this->fileloggerextra; } else { unset($CFG->backup_file_logger_extra); } if ($this->fileloggerlevelextra !== null) { $CFG->backup_file_logger_level_extra = $this->fileloggerlevelextra; } else { unset($CFG->backup_file_logger_level_extra); } // Restore the rest of $CFG settings if ($this->debugging !== null) { $CFG->debug = $this->debugging; } else { unset($CFG->debug); } if ($this->debugdisplay !== null) { $CFG->debugdisplay = $this->debugdisplay; } else { unset($CFG->debugdisplay); } parent::tearDown(); }
public function tearDown() { parent::tearDown(); }
function tearDown() { lmbToolkit::restore(); parent::tearDown(); }
public function tearDown() { parent::tearDown(); chmod(TEST_FILE_LOCATION, 0644); }
public function tearDown() { $this->renderer = null; foreach ($this->savedtemplates as $template) { unlink($template); } $this->savedtemplates = array(); parent::tearDown(); }
function tearDown() { parent::tearDown(); $bok = groups_remove_member($this->groupid, $this->userid); $bok = groups_delete_group($this->groupid); }
public function tearDown() { $this->xml_security->disableExternalLoadOfEntities(); parent::tearDown(); }