public function tearDown() { parent::tearDown(); if ($this->file) { unlink($this->file); } }
public function tearDown() { global $civicrm_setting; $civicrm_setting = $this->origSetting; CRM_Utils_Cache::singleton()->flush(); parent::tearDown(); }
function tearDown() { if ($this->file) { unlink($this->file); } parent::tearDown(); }
public function tearDown() { CRM_Utils_Hook::singleton()->reset(); parent::tearDown(); $this->callAPISuccess('system', 'flush', array()); $this->quickCleanup(array('civicrm_domain')); }
function tearDown() { parent::tearDown(); CRM_Core_DAO::singleValueQuery('DELETE FROM civicrm_managed'); CRM_Core_DAO::singleValueQuery('DELETE FROM civicrm_option_value WHERE name like "CRM_Example_%"'); \Civi\Core\Container::singleton(TRUE); }
function tearDown() { $this->quickCleanup(array('civicrm_job', 'civicrm_action_log', 'civicrm_action_schedule')); $this->quickCleanUpFinancialEntities(); CRM_Utils_Hook::singleton()->reset(); parent::tearDown(); }
public function tearDown() { parent::tearDown(); // The membershipType create breaks transactions so this extra cleanup is needed. $this->membershipTypeDelete(array('id' => $this->membershipTypeID)); $this->cleanUpSetUpIDs(); }
/** * */ function tearDown() { $this->_mut->stop(); $this->quickCleanup(array('civicrm_mailing', 'civicrm_mailing_job', 'civicrm_contact')); CRM_Utils_Hook::singleton()->reset(); parent::tearDown(); }
public function tearDown() { parent::tearDown(); $this->system = NULL; $this->quickCleanup(array('civicrm_payment_processor')); CRM_Core_DAO::executeQuery('DELETE FROM civicrm_payment_processor_type WHERE class_name = "test.extension.manager.paymenttest"'); }
public function tearDown() { CRM_Core_I18n_Schema::makeSinglelingual('en_US'); $logging = new CRM_Logging_Schema(); $logging->dropAllLogTables(); parent::tearDown(); }
function tearDown() { // TODO Figure out how to automatically drop all temporary tables. // Note that MySQL doesn't provide a way to list them, so we would need // to keep track ourselves (eg CRM_Core_TemporaryTableManager) or reset // the MySQL connection between test runs. parent::tearDown(); }
/** * Restore the DB for the next test. * * @throws \Exception */ public function tearDown() { $this->callAPISuccess('Setting', 'create', array('includeOrderByClause' => TRUE)); // truncate a few tables $tablesToTruncate = array('civicrm_email', 'civicrm_contribution', 'civicrm_line_item', 'civicrm_website', 'civicrm_relationship', 'civicrm_uf_match', 'civicrm_phone', 'civicrm_address', 'civicrm_acl_contact_cache', 'civicrm_activity_contact', 'civicrm_activity'); $this->quickCleanup($tablesToTruncate, TRUE); parent::tearDown(); }
public function tearDown() { CRM_Utils_Hook::singleton()->reset(); $this->quickCleanup(array('civicrm_group')); $config = CRM_Core_Config::singleton(); unset($config->userPermissionClass->permissions); parent::tearDown(); }
/** * Clean up log tables. */ protected function tearDown() { $this->quickCleanup(array('civicrm_email')); parent::tearDown(); $this->callAPISuccess('Setting', 'create', array('logging' => FALSE)); $schema = new CRM_Logging_Schema(); $schema->dropAllLogTables(); CRM_Core_DAO::executeQuery("DELETE FROM civicrm_setting WHERE name LIKE 'logg%'"); }
public function tearDown() { // May or may not cleanup well if there's a bug in the indexer. // This is better than nothing -- and better than duplicating the // cleanup logic. $idx = new CRM_Core_InnoDBIndexer(FALSE, array()); $idx->fixSchemaDifferences(); parent::tearDown(); }
/** */ public function tearDown() { $this->_mut->stop(); // $this->quickCleanup(array('civicrm_mailing', 'civicrm_mailing_job', 'civicrm_contact')); CRM_Utils_Hook::singleton()->reset(); CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0; // DGW parent::tearDown(); }
function tearDown() { // Normally, we wouldn't want to truncate any tables as it makes running // the tests slower and opens the door for writing test that aren't self- // sufficient, but we're forced into this as CiviUnitTestCase forces a // quickCleanup on civicrm_contact in its tearDown. :( $this->quickCleanup(array('civicrm_email', 'civicrm_queue_item', 'civimailchimp_sync_settings', 'civimailchimp_interest_groups_sync_settings', 'civimailchimp_sync_log')); civimailchimp_static('mailchimp_static_reset', NULL, TRUE); parent::tearDown(); }
/** */ public function tearDown() { //$this->_mut->clearMessages(); $this->_mut->stop(); CRM_Utils_Hook::singleton()->reset(); CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0; // DGW //$this->cleanupMailingTest(); parent::tearDown(); }
function tearDown() { $noise = $this->callAPISuccess('Contact', 'get', array('id' => $this->noise['individual'], 'return' => array('email'), 'api.Address.get' => 1)); $this->assertEquals(1, count($noise['values'])); foreach ($noise['values'] as $value) { $this->assertEquals('*****@*****.**', $value['email']); $this->assertEquals(1, count($value['api.Address.get']['values'])); } CRM_core_DAO::executeQuery('DELETE FROM civicrm_address WHERE contact_id=%1', array(1 => array($this->noise['individual'], 'Positive'))); $this->callAPISuccess('Contact', 'delete', array('id' => $this->noise['individual'])); parent::tearDown(); }
public function tearDown() { parent::tearDown(); $this->quickCleanup(array('civicrm_custom_field', 'civicrm_custom_group')); }
function tearDown() { $config = CRM_Core_Config::singleton(); $config->configAndLogDir = $this->oldConfigAndLogDir; parent::tearDown(); }
public function tearDown() { parent::tearDown(); CRM_Utils_Time::resetTime(); }
/** * Restore database to empty state. * * Note that rollback won't remove custom tables. * * @throws \Exception */ public function tearDown() { $tablesToTruncate = array('civicrm_contact'); $this->quickCleanup($tablesToTruncate, TRUE); parent::tearDown(); }
public function tearDown() { $GLOBALS['civicrm_setting'] = $this->origSetting; parent::tearDown(); }
public function tearDown() { CRM_Core_DAO::executeQuery("DELETE FROM civicrm_setting WHERE name = 'verifySSL'"); CRM_Core_Config::singleton(TRUE); parent::tearDown(); }
public function tearDown() { parent::tearDown(); \Civi::reset(); }
function tearDown() { parent::tearDown(); }
/** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. * * @access protected */ protected function tearDown() { parent::tearDown(); $this->deleteTestObjects(); }
function tearDown() { parent::tearDown(); $this->system = NULL; }
protected function tearDown() { parent::tearDown(); $this->quickCleanup($this->tablesToTruncate, TRUE); }