Пример #1
0
 /**
  * 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);
     remove_action('clear_auth_cookie', array($this, 'logout'));
     error_reporting($this->_error_level);
     set_current_screen('front');
 }
 public function setUp()
 {
     global $wp_rewrite;
     parent::setUp();
     update_option('page_comments', true);
     update_option('comments_per_page', 5);
     update_option('posts_per_page', 5);
     $wp_rewrite->init();
     $wp_rewrite->set_permalink_structure($this->structure);
     create_initial_taxonomies();
     $wp_rewrite->flush_rules();
 }