当前位置: 首页>>代码示例>>PHP>>正文


PHP WebTestCase::tearDown方法代码示例

本文整理汇总了PHP中WebTestCase::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP WebTestCase::tearDown方法的具体用法?PHP WebTestCase::tearDown怎么用?PHP WebTestCase::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebTestCase的用法示例。


在下文中一共展示了WebTestCase::tearDown方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     $pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO');
     /* @var $pluginSettingsDao PluginSettingsDAO */
     $pluginSettingsDao->_getCache(0, 'luceneplugin')->flush();
 }
开发者ID:mariojp,项目名称:ojs,代码行数:7,代码来源:FunctionalLucenePluginBaseTestCase.inc.php

示例2: tearDown

 /**
  * @see PHPUnit_Framework_TestCase::tearDown()
  */
 protected function tearDown()
 {
     // Restart the session so that we get access
     // to Selenium to clean up our configuration.
     $this->start();
     // Explicitly stop Selenium otherwise our session
     // will not be freed for re-use.
     $this->stop();
     parent::tearDown();
 }
开发者ID:reconciler,项目名称:ojs,代码行数:13,代码来源:FunctionalUrnPubIdPluginTest.php

示例3: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     $this->deleteTmpDir('StandardFormLogin');
 }
开发者ID:xingshanghe,项目名称:symfony,代码行数:5,代码来源:LocalizedRoutesAsPathTest.php

示例4: tearDown

 /**
  * @see PHPUnit_Framework_TestCase::tearDown()
  */
 protected function tearDown()
 {
     // Restart the session so that we get access
     // to Selenium to clean up our configuration.
     $this->start();
     // Reset to standard settings. We have to do this
     // through the UI to correctly reset caches, too.
     $this->resetDoiSettings();
     // Explicitly stop Selenium otherwise our session
     // will not be freed for re-use.
     $this->stop();
     parent::tearDown();
 }
开发者ID:mosvits,项目名称:ojs,代码行数:16,代码来源:FunctionalDoiPubIdPluginTestCase.php

示例5: tearDown

 /**
  * tearDown implementation, setting back switched modules etc
  */
 function tearDown()
 {
     if ($this->_modules != $this->_originalModules) {
         $form_state['values'] = array('status' => $this->_originalModules, 'op' => t('Save configuration'));
         drupal_execute('system_modules', $form_state);
         //rebuilding all caches
         drupal_rebuild_theme_registry();
         node_types_rebuild();
         menu_rebuild();
         cache_clear_all('schema', 'cache');
         module_rebuild_cache();
         $this->_modules = $this->_originalModules;
     }
     foreach ($this->_cleanupVariables as $name => $value) {
         if (is_null($value)) {
             variable_del($name);
         } else {
             variable_set($name, $value);
         }
     }
     $this->_cleanupVariables = array();
     //delete nodes
     foreach ($this->_cleanupNodes as $nid) {
         node_delete($nid);
     }
     $this->_cleanupNodes = array();
     //delete roles
     while (sizeof($this->_cleanupRoles) > 0) {
         $rid = array_pop($this->_cleanupRoles);
         db_query("DELETE FROM {role} WHERE rid = %d", $rid);
         db_query("DELETE FROM {permission} WHERE rid = %d", $rid);
     }
     //delete users and their content
     while (sizeof($this->_cleanupUsers) > 0) {
         $uid = array_pop($this->_cleanupUsers);
         // cleanup nodes this user created
         $result = db_query("SELECT nid FROM {node} WHERE uid = %d", $uid);
         while ($node = db_fetch_array($result)) {
             node_delete($node['nid']);
         }
         user_delete(array(), $uid);
     }
     //delete content types
     foreach ($this->_cleanupContentTypes as $type) {
         node_type_delete($type);
     }
     $this->_cleanupContentTypes = array();
     //Output drupal warnings and messages into assert messages
     $drupal_msgs = drupal_get_messages();
     foreach ($drupal_msgs as $type => $msgs) {
         foreach ($msgs as $msg) {
             $this->assertTrue(TRUE, "{$type}: {$msg}");
         }
     }
     parent::tearDown();
 }
开发者ID:sdboyer,项目名称:sdboyer-test,代码行数:59,代码来源:drupal_test_case.php

示例6: tearDown

 /**
  * Tears down the fixture.
  */
 public function tearDown()
 {
     parent::tearDown();
 }
开发者ID:dasigr,项目名称:laravelcommerce,代码行数:7,代码来源:HomePageTest.php

示例7: tearDown

 /**
  * tearDown implementation, setting back switched modules etc
  */
 function tearDown()
 {
     foreach ($this->_cleanupModules as $name => $status) {
         db_query("UPDATE {system} SET status = %d WHERE name = '%s' AND type = 'module'", $status, $name);
     }
     $this->_cleanupModules = array();
     // Refresh the modules list
     module_list(TRUE, FALSE);
     menu_rebuild();
     foreach ($this->_cleanupVariables as $name => $value) {
         if (is_null($value)) {
             variable_del($name);
         } else {
             variable_set($name, $value);
         }
     }
     $this->_cleanupVariables = array();
     while (sizeof($this->_cleanupRoles) > 0) {
         $rid = array_pop($this->_cleanupRoles);
         db_query("DELETE FROM {role} WHERE rid = %d", $rid);
         db_query("DELETE FROM {permission} WHERE rid = %d", $rid);
     }
     while (sizeof($this->_cleanupUsers) > 0) {
         $uid = array_pop($this->_cleanupUsers);
         // cleanup nodes this user created
         $result = db_query("SELECT nid FROM {node} WHERE uid = %d", $uid);
         while ($node = db_fetch_array($result)) {
             node_delete($node['nid']);
         }
         user_delete(array(), $uid);
     }
     parent::tearDown();
 }
开发者ID:jiva-technology,项目名称:smcuk,代码行数:36,代码来源:drupal_test_case.php

示例8: tearDown

 public function tearDown()
 {
     parent::tearDown();
     set_include_path($this->old_include_path);
 }
开发者ID:jkinner,项目名称:ringside,代码行数:5,代码来源:FacebookAPITrustTestCase.php


注:本文中的WebTestCase::tearDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。