當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UnitTestCase::tearDown方法代碼示例

本文整理匯總了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();
     }
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:7,代碼來源:composite_user_manipulation.test.php

示例2: tearDown

 public function tearDown()
 {
     $this->clear_tables();
     Session::instance()->destroy();
     Session::instance()->create();
     parent::tearDown();
 }
開發者ID:ready4god2513,項目名稱:Journal,代碼行數:7,代碼來源:base_test_case.php

示例3: tearDown

 public function tearDown()
 {
     parent::tearDown();
     unset($GLOBALS['sys_force_ssl']);
     unset($GLOBALS['sys_default_domain']);
     unset($GLOBALS['sys_https_host']);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:7,代碼來源:Webdav_URLVerificationTest.php

示例4: tearDown

 function tearDown()
 {
     if (file_exists($this->cache_file)) {
         unlink($this->cache_file);
     }
     parent::tearDown();
 }
開發者ID:anykey84,項目名稱:YaBackup,代碼行數:7,代碼來源:lmbCachingFileLocatorTest.class.php

示例5: tearDown

 public function tearDown()
 {
     parent::tearDown();
     if ($this->newInstanceEachTest) {
         $this->selenium->stop();
         $this->selenium = null;
     }
 }
開發者ID:googlecode-mirror,項目名稱:bulldoc,代碼行數:8,代碼來源:selenium.php

示例6: tearDown

 function tearDown()
 {
     parent::tearDown();
     $_GET = array();
     $_POST = array();
     $_REQUEST = array();
     Piwik_TablePartitioning::$tablesAlreadyInstalled = null;
 }
開發者ID:nnnnathann,項目名稱:piwik,代碼行數:8,代碼來源:DocumentationGenerator.test.php

示例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();
     */
 }
開發者ID:nagyist,項目名稱:tao-core,代碼行數:9,代碼來源:ConnectorUserServiceTestCase.php

示例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();
 }
開發者ID:prop7,項目名稱:thinktank,代碼行數:16,代碼來源:class.ThinkTankBasicUnitTestCase.php

示例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;
 }
開發者ID:nnnnathann,項目名稱:piwik,代碼行數:10,代碼來源:Database.test.php

示例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();
 }
開發者ID:unruthless,項目名稱:ThinkUp,代碼行數:19,代碼來源:class.ThinkUpBasicUnitTestCase.php

示例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();
 }
開發者ID:sdboyer,項目名稱:sdboyer-test,代碼行數:22,代碼來源:drupal_web_test_case.php

示例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();
     }
 }
開發者ID:nigeldaley,項目名稱:moodle,代碼行數:19,代碼來源:simpletestlib.php

示例13: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $_SERVER['HTTP_HOST'] = $this->host;
 }
開發者ID:nnnnathann,項目名稱:piwik,代碼行數:5,代碼來源:Nonce.test.php

示例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();
 }
開發者ID:vuchannguyen,項目名稱:web,代碼行數:47,代碼來源:testcheck.php

示例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);
 }
開發者ID:laiello,項目名稱:fredistrano,代碼行數:23,代碼來源:configure.test.php


注:本文中的UnitTestCase::tearDown方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。