Example #1
0
 public function tearDown()
 {
     foreach (SugarTestContactUtilities::getCreatedContactIds() as $id) {
         $GLOBALS['db']->query("DELETE FROM accounts_contacts WHERE contact_id = '{$id}'");
     }
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     unset($GLOBALS['beanList']);
     unset($GLOBALS['beanFiles']);
 }
 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']);
 }