tearDown() public method

Reset $_POST, remove the wp_die() override, restore error reporting
public tearDown ( )
Ejemplo n.º 1
0
 /**
  * Tear down the test fixture.
  */
 public function tearDown()
 {
     // Cleanup
     foreach ($this->_ids as $id) {
         wp_delete_attachment($id, true);
     }
     parent::tearDown();
 }
 function tearDown()
 {
     $this->plugin->customize_concurrency->customize_manager = null;
     unset($GLOBALS['wp_customize']);
     unset($GLOBALS['wp_scripts']);
     unset($_REQUEST['wp_customize']);
     unset($_SERVER['REQUEST_METHOD']);
     parent::tearDown();
 }
 function tearDown()
 {
     $GLOBALS['wp_theme_directories'] = $this->orig_theme_dir;
     remove_filter('theme_root', array($this, 'filter_theme_root'));
     remove_filter('stylesheet_root', array($this, 'filter_theme_root'));
     remove_filter('template_root', array($this, 'filter_theme_root'));
     wp_clean_themes_cache();
     unset($GLOBALS['wp_themes']);
     parent::tearDown();
 }
	/**
	 * Tear down the test fixture.
	 */
	public function tearDown() {
		// Cleanup
		foreach ($this->_ids as $id){
			wp_delete_attachment($id, true);
		}

		$uploads = wp_upload_dir();
		foreach ( scandir( $uploads['basedir'] ) as $file )
			_rmdir( $uploads['basedir'] . '/' . $file );

		parent::tearDown();
	}
 /**
  * Tear down.
  */
 function tearDown()
 {
     $this->plugin->customize_snapshot_manager->customize_manager = null;
     $this->manager = null;
     unset($GLOBALS['wp_customize']);
     unset($GLOBALS['wp_scripts']);
     unset($_SERVER['REQUEST_METHOD']);
     unset($_REQUEST['wp_customize']);
     unset($_REQUEST['customize_snapshot_uuid']);
     unset($_REQUEST['preview']);
     parent::tearDown();
 }
 public function tearDown()
 {
     remove_filter('query', array($this, '_block_comments'));
     parent::tearDown();
 }
Ejemplo n.º 7
0
 function tearDown()
 {
     wp_set_current_user($this->old_current_user);
     parent::tearDown();
 }
 /**
  * Tear down the test fixture.
  */
 public function tearDown()
 {
     wp_set_current_user(0);
     parent::tearDown();
 }
Ejemplo n.º 9
0
 function tearDown()
 {
     parent::tearDown();
     m::close();
     cmb2_update_option(WP_Gistpen::$plugin_name, '_wpgp_gist_token', false);
 }
Ejemplo n.º 10
0
 /**
  * Tear down the test fixture.
  */
 public function tearDown()
 {
     // Cleanup
     $this->remove_added_uploads();
     parent::tearDown();
 }
Ejemplo n.º 11
0
 /**
  * Tear down.
  */
 public function tearDown()
 {
     parent::tearDown();
     $_REQUEST = array();
 }