コード例 #1
0
ファイル: Bug40527Test.php プロジェクト: nickpro/sugarcrm_dev
 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);
 }
コード例 #2
0
ファイル: Bug40527Test.php プロジェクト: jgera/sugarcrm_dev
 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);
 }
コード例 #3
0
ファイル: Bug58863Test.php プロジェクト: thsonvt/sugarcrm_dev
 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();
 }