Пример #1
0
 /**
  * Tears down the fixture, for example, close a network connection.
  * This method is called after a test is executed.
  */
 public function tearDown()
 {
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestOpportunityUtilities::removeAllCreatedOpportunities();
     SugarTestContactUtilities::removeAllCreatedContacts();
     parent::tearDown();
     SugarTestHelper::tearDown();
 }
Пример #2
0
 public function tearDown()
 {
     SugarTestHelper::tearDown();
     SugarTestOpportunityUtilities::removeAllCreatedOpportunities();
     SugarTestEmailUtilities::removeAllCreatedEmails();
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     $GLOBALS['app'] = $this->application;
 }
 private function _createAccount($time)
 {
     if (self::$_createdAccount === null) {
         $name = 'SugarOpportunityAccount';
         $account = new Account();
         $account->name = $name . $time;
         $account->email1 = 'account@' . $time . 'sugar.com';
         $account->save();
         $GLOBALS['db']->commit();
         self::$_createdAccount = $account;
     }
     return self::$_createdAccount;
 }
Пример #4
0
 public function tearDown()
 {
     $GLOBALS['db']->query("DELETE FROM saved_reports WHERE id = '{$this->_report->saved_report->id}'");
     SugarTestOpportunityUtilities::removeAllCreatedOpportunities();
     SugarTestHelper::tearDown();
 }
Пример #5
0
 protected function tearDown()
 {
     $this->currentUser->setPreference(self::DEFAULT_EXPORT_CHARSET_PREF_NAME, $this->defaultExportCharset);
     SugarTestHelper::tearDown();
     SugarTestOpportunityUtilities::removeAllCreatedOpportunities();
 }