public static function tearDownAfterClass() { if (!empty(self::$_opportunities)) { $GLOBALS['db']->query('DELETE FROM opportunities WHERE id IN (\'' . implode("', '", self::$_opportunities) . '\')'); } parent::tearDownAfterClass(); }
public function tearDown() { $GLOBALS['db']->query("DELETE FROM contacts WHERE id= '{$this->c->id}'"); $GLOBALS['db']->query("DELETE FROM contacts WHERE id= '{$this->_resultId}'"); unset($this->c); parent::tearDown(); }
/** * Remove anything that was used during this test * */ public function tearDown() { parent::tearDown(); global $soap_version_test_accountId, $soap_version_test_opportunityId, $soap_version_test_contactId; unset($soap_version_test_accountId); unset($soap_version_test_opportunityId); unset($soap_version_test_contactId); }
public function tearDown() { $GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' "); $GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' "); $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' "); unset($GLOBALS['reload_vardefs']); parent::tearDown(); }
public function tearDown() { SugarTestAccountUtilities::removeAllCreatedAccounts(); SugarTestContactUtilities::removeAllCreatedContacts(); parent::tearDown(); parent::_tearDownTestUser(); SugarTestHelper::tearDown(); }
public static function setUpBeforeClass() { self::$_user = SugarTestUserUtilities::createAnonymousUser(); self::$_user->status = 'Active'; self::$_user->is_admin = 1; self::$_user->save(); $GLOBALS['db']->commit(); $GLOBALS['current_user'] = self::$_user; }
/** * Remove anything that was used during this test * */ public function tearDown() { parent::tearDown(); SugarTestAccountUtilities::removeAllCreatedAccounts(); global $soap_version_test_accountId, $soap_version_test_opportunityId, $soap_version_test_contactId; unset($soap_version_test_accountId); unset($soap_version_test_opportunityId); unset($soap_version_test_contactId); }
/** * Remove anything that was used during this test * */ public function tearDown() { SugarTestContactUtilities::removeCreatedContactsUsersRelationships(); $this->_contact = null; SugarTestMeetingUtilities::removeAllCreatedMeetings(); SugarTestMeetingUtilities::removeMeetingContacts(); $this->_meeting = null; parent::tearDown(); }
public function tearDown() { if (!empty($this->email_id)) { $GLOBALS['db']->query("DELETE FROM emails WHERE id='{$this->email_id}'"); $GLOBALS['db']->query("DELETE FROM emails_beans WHERE email_id='{$this->email_id}'"); $GLOBALS['db']->query("DELETE FROM emails_text WHERE email_id='{$this->email_id}'"); $GLOBALS['db']->query("DELETE FROM emails_email_addr_rel WHERE email_id='{$this->email_id}'"); } parent::tearDown(); }
/** * Remove anything that was used during this test * */ public function tearDown() { parent::tearDown(); SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); SugarTestContactUtilities::removeAllCreatedContacts(); SugarTestContactUtilities::removeCreatedContactsUsersRelationships(); $this->_contact = null; SugarTestMeetingUtilities::removeMeetingContacts(); unset($GLOBALS['beanList']); unset($GLOBALS['beanFiles']); }
public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); if (!empty($this->email_id)) { $GLOBALS['db']->query("DELETE FROM emails WHERE id='{$this->email_id}'"); $GLOBALS['db']->query("DELETE FROM emails_beans WHERE email_id='{$this->email_id}'"); $GLOBALS['db']->query("DELETE FROM emails_text WHERE email_id='{$this->email_id}'"); $GLOBALS['db']->query("DELETE FROM emails_email_addr_rel WHERE email_id='{$this->email_id}'"); } SugarTestAccountUtilities::removeAllCreatedAccounts(); parent::tearDown(); }
public function setUp() { $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php'; parent::setUp(); SugarTestHelper::setUp('beanFiles'); SugarTestHelper::setUp('beanList'); $this->user = SugarTestHelper::setUp('current_user', array(true, true)); // Create an opportunity for the report $opportunity = SugarTestOpportunityUtilities::createOpportunity(); // Create and save summary with details report on opportunities, filtered by id of the above created opportunity $this->_report = new Report('{"display_columns":[{"name":"name","label":"Opportunity Name","table_key":"self"},{"name":"sales_stage","label":"Sales Stage","table_key":"self"}],"module":"Opportunities","group_defs":[{"name":"opportunity_type","label":"Type","table_key":"self","type":"enum","force_label":"Type"}],"summary_columns":[{"name":"opportunity_type","label":"Type","table_key":"self"}],"report_name":"Opp by type","chart_type":"none","do_round":1,"chart_description":"","numerical_chart_column":"","numerical_chart_column_type":"","assigned_user_id":"1","report_type":"summary","full_table_list":{"self":{"value":"Opportunities","module":"Opportunities","label":"Opportunities"}},"filters_def":{"Filter_1":{"0":{"name":"id","table_key":"self","qualifier_name":"is","input_name0":"' . $opportunity->id . '","input_name1":"' . $opportunity->name . '","column_name":"self:id","id":"rowid0"},"operator":"AND"}}}'); $_REQUEST['assigned_user_id'] = $GLOBALS['current_user']->id; $this->_report->save("testSummaryReportWithDetails"); }
/** * Remove anything that was used during this test * */ public function tearDown() { $GLOBALS['db']->query("DELETE FROM contacts WHERE id= '{$this->cont1->id}'"); $GLOBALS['db']->query("DELETE FROM contacts WHERE id= '{$this->cont2->id}'"); $GLOBALS['db']->query("DELETE FROM accounts_contacts WHERE contact_id= '{$this->cont1->id}'"); $GLOBALS['db']->query("DELETE FROM accounts_contacts WHERE contact_id= '{$this->cont2->id}'"); $GLOBALS['db']->query("DELETE FROM accounts WHERE id= '{$this->accnt1->id}'"); $GLOBALS['db']->query("DELETE FROM accounts WHERE id= '{$this->accnt2->id}'"); unset($this->accnt1); unset($this->accnt2); unset($this->cont1); unset($this->cont2); parent::tearDown(); }
public function tearDown() { //$this->_contact->mark_deleted($this->_contact->id); parent::tearDown(); $administration = new Administration(); $administration->retrieveSettings(); if ($this->_opt === null) { if (isset($administration->settings['portal_on'])) { $administration->saveSetting('portal', 'on', 0); } } else { $administration->saveSetting('portal', 'on', $this->_opt); } }
/** * setUp * Override the setup from SoapTestCase to also create the seed search data for Accounts and Contacts. */ public function setUp() { $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php'; parent::setUp(); $this->_login(); // Logging in just before the SOAP call as this will also commit any pending DB changes $this->contact = SugarTestContactUtilities::createContact(); $this->contact->contacts_users_id = $GLOBALS['current_user']->id; $this->contact->save(); $this->account = SugarTestAccountUtilities::createAccount(); $this->account->email1 = $this->contact->email1; $this->account->save(); $this->lead = SugarTestLeadUtilities::createLead(); $this->lead->email1 = $this->contact->email1; $this->lead->save(); $GLOBALS['db']->commit(); // Making sure these changes are committed to the database }
public function tearDown() { $this->df->deleteField($this->field); SugarTestAccountUtilities::removeAllCreatedAccounts(); SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); parent::tearDown(); global $soap_version_test_accountId, $soap_version_test_opportunityId, $soap_version_test_contactId; unset($soap_version_test_accountId); unset($soap_version_test_opportunityId); unset($soap_version_test_contactId); unset($GLOBALS['beanFiles']); unset($GLOBALS['beanList']); }
public function tearDown() { SugarTestLeadUtilities::removeAllCreatedLeads(); parent::tearDown(); }
public function tearDown() { parent::tearDown(); $GLOBALS['db']->query(sprintf("DELETE FROM prospects WHERE id = '%d'", $this->contact->id)); SugarTestContactUtilities::removeAllCreatedContacts(); }
/** * Test for soap/SoapSugarUsers.php::get_entries_count() * * @group 43339 */ public function testGetEntriesCountFromBasicSoap() { $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php'; parent::setUp(); $auth = $this->_soapClient->call('login', array('user_auth' => array('user_name' => $this->_user->user_name, 'password' => $this->_user->user_hash, 'version' => '.01'), 'application_name' => 'SoapTest', "name_value_list" => array())); $params = array('session' => $auth['id'], 'module_name' => $this->_moduleName, 'query' => $this->_customFieldName . ' LIKE \'\'', 'deleted' => 0); $assert = $this->_soapClient->call('get_entries_count', $params); $this->assertNotEquals(NULL, $assert['result_count']); }
public function tearDown() { parent::tearDown(); $GLOBALS['db']->query("DELETE FROM prospects WHERE id = '{$this->contact->id}'"); }
public function setUp() { $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php?XDEBUG_SESSION_START=michael'; parent::setUp(); }
public function setUp() { $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php'; parent::setUp(); }
public function tearDown() { SugarTestMeetingUtilities::removeAllCreatedMeetings(); SugarTestMeetingUtilities::removeMeetingUsers(); parent::tearDown(); }
public function tearDown() { $this->df->deleteField($this->field); SugarTestAccountUtilities::removeAllCreatedAccounts(); parent::tearDown(); global $soap_version_test_accountId, $soap_version_test_opportunityId, $soap_version_test_contactId; unset($soap_version_test_accountId); unset($soap_version_test_opportunityId); unset($soap_version_test_contactId); SugarTestHelper::tearDown(); }
public function tearDown() { global $current_user; SugarTestContactUtilities::removeAllCreatedContacts(); $GLOBALS['db']->query("DELETE FROM contacts WHERE id in ('{$this->_resultId}', '{$this->_resultId2}')"); $GLOBALS['db']->query("DELETE FROM contacts_users WHERE user_id = '{$current_user->id}'"); $GLOBALS['db']->commit(); unset($this->c); unset($this->c2); parent::tearDown(); }
public function tearDown() { parent::tearDown(); }