function tearDown()
 {
     global $wp_filesystem;
     remove_filter('filesystem_method_file', array($this, 'filter_abstraction_file'));
     remove_filter('filesystem_method', array($this, 'filter_fs_method'));
     unset($wp_filesystem);
     parent::tearDown();
 }
 public function tearDown()
 {
     EE_Register_Payment_Method::deregister('onsite');
     EE_Register_Payment_Method::deregister('offsite');
     parent::tearDown();
 }
 public function tearDown()
 {
     //ensure the models aren't stil registered. they should have either been
     //deregistered during the test, or not been registered at all
     $this->assertArrayDoesNotContain('EEM_Mock', EE_Registry::instance()->non_abstract_db_models);
     $this->assertArrayDoesNotContain('EEM_Mock', EE_Registry::instance()->models);
     $this->_stop_pretending_addon_hook_time();
     parent::tearDown();
 }
 public function tearDown()
 {
     EE_Register_Capabilities::deregister('Test_Capabilities');
     parent::tearDown();
 }
 public function tearDown()
 {
     if (isset($this->_addon_name) && isset(EE_Registry::instance()->addons->EE_New_Addon)) {
         $main_file_path_before_deregistration = EE_Registry::instance()->addons->EE_New_Addon->get_main_plugin_file_basename();
         EE_Register_Addon::deregister($this->_addon_name);
         try {
             EE_Registry::instance()->addons->EE_New_Addon;
             $this->fail('EE_New_Addon is still registered. Deregister failed');
         } catch (PHPUnit_Framework_Error_Notice $e) {
             $this->assertEquals(EE_UnitTestCase::error_code_undefined_property, $e->getCode());
         }
         //verify the deactvation hook was removed
         $this->assertFalse(has_action('deactivate_' . $main_file_path_before_deregistration));
         //verify the models were deregistered
         EE_System::instance()->load_core_configuration();
         $this->assertArrayDoesNotContain('EEM_New_Addon_Thing', EE_Registry::instance()->non_abstract_db_models);
         $this->assertArrayDoesNotContain('EEM_New_Addon_Thing', EE_Registry::instance()->models);
         EE_Registry::instance()->reset_model('Attendee');
         //verify that the model and class extensions have been removed
         $this->assertFalse($this->_class_has_been_extended());
         $this->assertFalse($this->_model_has_been_extended());
     }
     //verify DMSs deregistered
     $DMSs_available = EE_Data_Migration_Manager::reset()->get_all_data_migration_scripts_available();
     $this->assertArrayNotHasKey('EE_DMS_New_Addon_1_0_0', $DMSs_available);
     $this->_stop_pretending_addon_hook_time();
     $this->_stop_pretending_after_plugin_activation();
     remove_all_filters('AHEE__EE_System__load_espresso_addons');
     parent::tearDown();
 }
 public function tearDown()
 {
     //restore the timezone string to the default
     update_option('timezone_string', '');
     parent::tearDown();
 }
 /**
  * restore the epsresso_db_update option
  */
 function tearDown()
 {
     update_option('espresso_db_update', $this->_original_espresso_db_update);
     EE_System::reset()->detect_req_type();
     EE_Data_Migration_Manager::reset();
     update_option(EE_Data_Migration_Manager::current_database_state, $this->_original_db_state);
     parent::tearDown();
 }
 public function tearDown()
 {
     //if somehow $this->_addon isn't set, we don't need to worry about deregistering it right?
     if ($this->_addon instanceof EE_Addon) {
         update_option($this->_addon->get_activation_history_option_name(), $this->_addon_activation_history);
         update_option(EE_Data_Migration_Manager::current_database_state, $this->_current_db_state);
         EE_Register_Addon::deregister($this->_addon_name);
         try {
             EE_Registry::instance()->addons->EE_New_Addon;
             $this->fail('EE_New_Addon is still registered. Deregister failed');
         } catch (PHPUnit_Framework_Error_Notice $e) {
             $this->assertEquals(EE_UnitTestCase::error_code_undefined_property, $e->getCode());
         }
         //verify DMSs deregistered
         $DMSs_available = EE_Data_Migration_Manager::reset()->get_all_data_migration_scripts_available();
         $this->assertArrayNotHasKey('EE_DMS_New_Addon_1_0_0', $DMSs_available);
         $this->_stop_pretending_addon_hook_time();
     }
     parent::tearDown();
 }
 public function tearDown()
 {
     //ensure the models aren't stil registered. they should have either been
     //deregistered during the test, or not been registered at all
     $this->_stop_pretending_addon_hook_time();
     parent::tearDown();
 }
 public function tearDown()
 {
     parent::tearDown();
 }