/** * Terminate execution abnormally. */ protected static function abend($code) { // do a hard rollback of any pending transactions // if we've come here, its because of some unexpected PEAR errors CRM_Core_Transaction::forceRollbackIfEnabled(); CRM_Utils_System::civiExit($code); }
/** * Common teardown functions for all unit tests. */ protected function tearDown() { error_reporting(E_ALL & ~E_NOTICE); CRM_Utils_Hook::singleton()->reset(); $this->hookClass->reset(); $session = CRM_Core_Session::singleton(); $session->set('userID', NULL); if ($this->tx) { $this->tx->rollback()->commit(); $this->tx = NULL; CRM_Core_Transaction::forceRollbackIfEnabled(); \Civi\Core\Transaction\Manager::singleton(TRUE); } else { CRM_Core_Transaction::forceRollbackIfEnabled(); \Civi\Core\Transaction\Manager::singleton(TRUE); $tablesToTruncate = array('civicrm_contact', 'civicrm_uf_match'); $this->quickCleanup($tablesToTruncate); $this->createDomainContacts(); } $this->cleanTempDirs(); $this->unsetExtensionSystem(); }