public function setUp() { $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); $this->contact = SugarTestContactUtilities::createContact(); $this->account = SugarTestAccountUtilities::createAccount(); $override_data = array('parent_type' => 'Accounts', 'parent_id' => $this->account->id); $this->email = SugarTestEmailUtilities::createEmail('', $override_data); }
public function setUp() { global $app_strings, $app_list_strings; $app_strings = return_application_language($GLOBALS['current_language']); $app_list_strings = return_app_list_strings_language($GLOBALS['current_language']); $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); $this->contact = SugarTestContactUtilities::createContact(); $this->account = SugarTestAccountUtilities::createAccount(); $override_data = array('parent_type' => 'Accounts', 'parent_id' => $this->account->id); $this->email = SugarTestEmailUtilities::createEmail('', $override_data); }
public function setUp() { SugarTestHelper::setUp('beanFiles'); SugarTestHelper::setUp('beanList'); SugarTestHelper::setUp('current_user'); $this->account = SugarTestAccountUtilities::createAccount(); $this->contact = SugarTestContactUtilities::createContact(); $this->email = SugarTestEmailUtilities::createEmail(); $this->opportunity = SugarTestOpportunityUtilities::createOpportunity('', $this->account); $this->contact->account_id = $this->account->id; $this->contact->save(); $this->opportunity->load_relationship('contacts'); $this->opportunity->contacts->add($this->contact); $this->email->parent_id = $this->contact->id; $this->email->parent_type = $this->contact->module_name; $this->email->save(); if (isset($GLOBALS['app'])) { $this->application = $GLOBALS['app']; } $GLOBALS['app'] = new SugarApplication(); $GLOBALS['app']->controller = new SugarController(); }