public function tearDown() { if (!empty($this->jobs)) { $jobs = implode("','", $this->jobs); $this->db->query("DELETE FROM job_queue WHERE id IN ('{$jobs}')"); } SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); $ids = SugarTestAccountUtilities::getCreatedAccountIds(); if (!empty($ids)) { SugarTestAccountUtilities::removeAllCreatedAccounts(); } }
public function tearDown() { $this->df->deleteField($this->field); $account_ids = SugarTestAccountUtilities::getCreatedAccountIds(); $contact_ids = SugarTestContactUtilities::getCreatedContactIds(); $GLOBALS['db']->query('DELETE FROM accounts_contacts WHERE contact_id IN (\'' . implode("', '", $contact_ids) . '\') OR account_id IN (\'' . implode("', '", $account_ids) . '\')'); SugarTestContactUtilities::removeAllCreatedContacts(); SugarTestAccountUtilities::removeAllCreatedAccounts(); SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); unset($GLOBALS['beanFiles']); unset($GLOBALS['beanList']); }