/** * Tear down the test fixture. * Reset $_POST, remove the wp_die() override, restore error reporting */ public function tearDown() { parent::tearDown(); $_POST = array(); $_GET = array(); unset($GLOBALS['post']); unset($GLOBALS['comment']); remove_filter('wp_die_ajax_handler', array($this, 'getDieHandler'), 1, 1); remove_action('clear_auth_cookie', array($this, 'logout')); error_reporting($this->_error_level); set_current_screen('front'); }
public function setUp() { parent::setUp(); update_option('page_comments', true); update_option('comments_per_page', 5); update_option('posts_per_page', 5); global $wp_rewrite; $wp_rewrite->init(); $wp_rewrite->set_permalink_structure($this->structure); create_initial_taxonomies(); $wp_rewrite->flush_rules(); }
function tearDown() { remove_filter('pre_option_enable_xmlrpc', '__return_true'); $this->remove_added_uploads(); parent::tearDown(); }