/** * Tear down test. */ function tearDown() { $this->manager = null; unset($GLOBALS['wp_customize']); $_REQUEST = array(); parent::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); }
public function tearDown() { parent::tearDown(); $_SERVER['HTTP_REFERER'] = ''; $_SERVER['REQUEST_URI'] = ''; $_REQUEST['_wp_http_referer'] = ''; }
public function tearDown() { parent::tearDown(); foreach (array('click_tracking', 'anon_tracking', 'license_code') as $setting) { $saved = \ingot\testing\crud\settings::write($setting, 0); } }
/** * 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')); }
function tearDown() { global $wpdb; update_site_option('ms_files_rewriting', 0); $wpdb->suppress_errors($this->suppress); parent::tearDown(); }
public function tearDown() { remove_action('tf_create_options', array($this, 'tf_create_options')); $titan = TitanFramework::getInstance('testing'); $titan->deleteAllOptions(); parent::tearDown(); }
function tearDown() { $this->manager = null; unset($GLOBALS['wp_customize']); unset($GLOBALS['wp_scripts']); parent::tearDown(); }
public function tearDown() { unset($GLOBALS['l10n']); unset($GLOBALS['l10n_unloaded']); _get_path_to_translation(null, true); parent::tearDown(); }
function tearDown() { global $wp_rewrite; parent::tearDown(); wp_set_current_user($this->old_current_user); $wp_rewrite->init(); }
public function tearDown() { global $locale, $wp_locale; $locale = $this->locale_original; $wp_locale = $this->wp_locale_original; parent::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(); }
public function tearDown() { unregister_post_type('cpt'); unregister_taxonomy('taxo'); $this->set_permalink_structure(''); parent::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'); }
public function tearDown() { parent::tearDown(); global $wpdb; $truncateNewsletterTable = sprintf('TRUNCATE %swpr_newsletters', $wpdb->prefix); $wpdb->query($truncateNewsletterTable); }
function tearDown() { $GLOBALS['wp_styles'] = $this->old_wp_styles; add_action('wp_default_styles', 'wp_default_styles'); add_action('wp_print_styles', 'print_emoji_styles'); parent::tearDown(); }
function tearDown() { parent::tearDown(); foreach (array('c2c_next_or_loop_post_link_output', 'c2c_previous_or_loop_post_link_output') as $filter) { remove_filter($filter, array($this, 'filter_append')); } }
/** * Runs after each test. */ public function tearDown() { parent::tearDown(); /* @var WP_REST_Server $wp_rest_server */ global $wp_rest_server; $wp_rest_server = null; }
function tearDown() { parent::tearDown(); _unregister_taxonomy( 'testtax' ); remove_action( 'pre_get_posts', array( $this, 'pre_get_posts_tax_category_tax_query' ) ); }
public function tearDown() { // Restoring global variables global $content_width; $content_width = $this->_globals['content_width']; parent::tearDown(); }
function tearDown() { global $shortcode_tags; foreach ( $this->shortcodes as $shortcode ) { unset( $shortcode_tags[ $shortcode ] ); } parent::tearDown(); }
public function tearDown() { global $wpdb; remove_action('bp_blogs_recorded_existing_blogs', array($this, 'set_autocommit_flag')); parent::tearDown(); // If we detect that a COMMIT has been triggered during the test, clean up blog and user fixtures. if ($this->autocommitted) { if (is_multisite()) { foreach ($wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs} WHERE blog_id != 1") as $blog_id) { wpmu_delete_blog($blog_id, true); } } foreach ($wpdb->get_col("SELECT ID FROM {$wpdb->users} WHERE ID != 1") as $user_id) { if (is_multisite()) { wpmu_delete_user($user_id); } else { wp_delete_user($user_id); } } } $this->commit_transaction(); // Reactivate any components that have been deactivated. foreach ($this->deactivated_components as $component) { buddypress()->active_components[$component] = 1; } $this->deactivated_components = array(); }
function tearDown() { global $wpdb, $current_site; $wpdb->suppress_errors($this->suppress); $current_site->id = 1; parent::tearDown(); }
function tearDown() { global $wp_rewrite; $wp_rewrite->init(); update_option('home', $this->home_url); parent::tearDown(); }
function tearDown() { $this->manager = null; unset( $GLOBALS['wp_customize'] ); unset( $GLOBALS['wp_scripts'] ); $GLOBALS['wp_registered_sidebars'] = $this->backup_registered_sidebars; parent::tearDown(); }
function tearDown() { remove_filter('extra_theme_headers', array($this, '_theme_data_extra_headers')); wp_clean_themes_cache(); unset($GLOBALS['wp_themes']); parent::tearDown(); }
/** * Break down for next test */ function tearDown() { global $wp_rewrite; $wp_rewrite->set_permalink_structure(''); _destroy_uploads(); parent::tearDown(); }
function tearDown() { foreach (array('curl', 'streams', 'fsockopen') as $t) { remove_filter("use_{$t}_transport", '__return_false'); } parent::tearDown(); }
function tearDown() { $GLOBALS['wp_scripts'] = $this->old_wp_scripts; $GLOBALS['wp_styles'] = $this->old_wp_styles; add_action('wp_default_scripts', 'wp_default_scripts'); add_action('wp_default_styles', 'wp_default_styles'); parent::tearDown(); }
function tearDown() { global $wp_rewrite; _unregister_taxonomy('testtax'); $wp_rewrite->init(); remove_action('pre_get_posts', array($this, 'pre_get_posts_tax_category_tax_query')); parent::tearDown(); }