本文整理汇总了PHP中WP_UnitTestCase::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_UnitTestCase::tearDown方法的具体用法?PHP WP_UnitTestCase::tearDown怎么用?PHP WP_UnitTestCase::tearDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_UnitTestCase
的用法示例。
在下文中一共展示了WP_UnitTestCase::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
/**
* Tear down test.
*/
function tearDown()
{
$this->manager = null;
unset($GLOBALS['wp_customize']);
$_REQUEST = array();
parent::tearDown();
}
示例2: tearDown
/**
* Tear down the test fixture.
* Remove the wp_die() override, restore error reporting
*/
public function tearDown()
{
parent::tearDown();
remove_filter('wp_die_ajax_handler', array($this, 'getDieHandler'), 1, 1);
remove_filter('wl_write_log_handler', array($this, 'get_write_log_handler'), 1, 1);
error_reporting($this->_error_level);
}
示例3: tearDown
public function tearDown()
{
parent::tearDown();
$_SERVER['HTTP_REFERER'] = '';
$_SERVER['REQUEST_URI'] = '';
$_REQUEST['_wp_http_referer'] = '';
}
示例4: tearDown
public function tearDown()
{
parent::tearDown();
foreach (array('click_tracking', 'anon_tracking', 'license_code') as $setting) {
$saved = \ingot\testing\crud\settings::write($setting, 0);
}
}
示例5: tearDown
/**
* Finish the test suite for the CASServerPlugin class.
*/
function tearDown()
{
parent::tearDown();
unset($this->server);
unset($this->redirect_location);
remove_filter('wp_redirect', array($this, 'wp_redirect_handler'));
}
示例6: tearDown
function tearDown()
{
global $wpdb;
update_site_option('ms_files_rewriting', 0);
$wpdb->suppress_errors($this->suppress);
parent::tearDown();
}
示例7: tearDown
public function tearDown()
{
remove_action('tf_create_options', array($this, 'tf_create_options'));
$titan = TitanFramework::getInstance('testing');
$titan->deleteAllOptions();
parent::tearDown();
}
示例8: tearDown
function tearDown()
{
$this->manager = null;
unset($GLOBALS['wp_customize']);
unset($GLOBALS['wp_scripts']);
parent::tearDown();
}
示例9: tearDown
public function tearDown()
{
unset($GLOBALS['l10n']);
unset($GLOBALS['l10n_unloaded']);
_get_path_to_translation(null, true);
parent::tearDown();
}
示例10: tearDown
function tearDown()
{
global $wp_rewrite;
parent::tearDown();
wp_set_current_user($this->old_current_user);
$wp_rewrite->init();
}
示例11: tearDown
public function tearDown()
{
global $locale, $wp_locale;
$locale = $this->locale_original;
$wp_locale = $this->wp_locale_original;
parent::tearDown();
}
示例12: tearDown
/**
* tearDown options
*/
function tearDown() {
update_option( 'page_comments', $this->option_page_comments );
update_option( 'comments_per_page', $this->option_page_comments );
update_option( 'thread_comments', $this->option_page_comments );
update_option( 'posts_per_rss', $this->option_posts_per_rss );
parent::tearDown();
}
示例13: tearDown
public function tearDown()
{
unregister_post_type('cpt');
unregister_taxonomy('taxo');
$this->set_permalink_structure('');
parent::tearDown();
}
示例14: tearDown
public function tearDown()
{
parent::tearDown();
remove_all_filters('bbpnns_dry_run');
remove_all_filters('bbpnns_skip_reply_notification');
remove_all_filters('bbpnns_skip_topic_notification');
}
示例15: tearDown
public function tearDown()
{
parent::tearDown();
global $wpdb;
$truncateNewsletterTable = sprintf('TRUNCATE %swpr_newsletters', $wpdb->prefix);
$wpdb->query($truncateNewsletterTable);
}