本文整理汇总了PHP中UnitTestCase::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP UnitTestCase::tearDown方法的具体用法?PHP UnitTestCase::tearDown怎么用?PHP UnitTestCase::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnitTestCase
的用法示例。
在下文中一共展示了UnitTestCase::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
function tearDown()
{
parent::tearDown();
foreach (array_keys($this->node_object_mocks) as $id) {
$this->node_object_mocks[$id]->tally();
}
}
示例2: tearDown
public function tearDown()
{
$this->clear_tables();
Session::instance()->destroy();
Session::instance()->create();
parent::tearDown();
}
示例3: tearDown
public function tearDown()
{
parent::tearDown();
unset($GLOBALS['sys_force_ssl']);
unset($GLOBALS['sys_default_domain']);
unset($GLOBALS['sys_https_host']);
}
示例4: tearDown
function tearDown()
{
if (file_exists($this->cache_file)) {
unlink($this->cache_file);
}
parent::tearDown();
}
示例5: tearDown
public function tearDown()
{
parent::tearDown();
if ($this->newInstanceEachTest) {
$this->selenium->stop();
$this->selenium = null;
}
}
示例6: tearDown
function tearDown()
{
parent::tearDown();
$_GET = array();
$_POST = array();
$_REQUEST = array();
Piwik_TablePartitioning::$tablesAlreadyInstalled = null;
}
示例7: tearDown
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();
*/
}
示例8: tearDown
/**
* 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();
}
示例9: 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;
}
示例10: tearDown
/**
* 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();
}
示例11: 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();
}
示例12: 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();
}
}
示例13: tearDown
public function tearDown()
{
parent::tearDown();
$_SERVER['HTTP_HOST'] = $this->host;
}
示例14: tearDown
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();
}
示例15: 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);
}