当前位置: 首页>>代码示例>>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;未经允许,请勿转载。