当前位置: 首页>>代码示例>>PHP>>正文


PHP SugarTestContactUtilities::createContact方法代码示例

本文整理汇总了PHP中SugarTestContactUtilities::createContact方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarTestContactUtilities::createContact方法的具体用法?PHP SugarTestContactUtilities::createContact怎么用?PHP SugarTestContactUtilities::createContact使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SugarTestContactUtilities的用法示例。


在下文中一共展示了SugarTestContactUtilities::createContact方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     SugarTestHelper::setUp('beanFiles');
     SugarTestHelper::setUp('beanList');
     SugarTestHelper::setUp('current_user');
     $this->contact = SugarTestContactUtilities::createContact();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:7,代码来源:Bug44138Test.php

示例2: testGetNamePlusEmailAddressesForComposePersonModule

 public function testGetNamePlusEmailAddressesForComposePersonModule()
 {
     $contact = SugarTestContactUtilities::createContact();
     $email = new Email();
     $this->assertEquals($GLOBALS['locale']->getLocaleFormattedName($contact->first_name, $contact->last_name, $contact->salutation, $contact->title) . " <{$contact->email1}>", $email->getNamePlusEmailAddressesForCompose('Contacts', array($contact->id)));
     SugarTestContactUtilities::removeAllCreatedContacts();
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:7,代码来源:GetNamePlusEmailAddressesForComposeTest.php

示例3: testConvertLinkingExistingContact

 /**
  * Create a lead and convert it to an existing Account and Contact
  */
 public function testConvertLinkingExistingContact()
 {
     // Create records
     $lead = SugarTestLeadUtilities::createLead();
     $account = SugarTestAccountUtilities::createAccount();
     $contact = SugarTestContactUtilities::createContact();
     // ConvertLead to an existing Contact and Account
     $_REQUEST = array('module' => 'Leads', 'record' => $lead->id, 'isDuplicate' => 'false', 'action' => 'ConvertLead', 'convert_create_Contacts' => 'false', 'report_to_name' => $contact->name, 'reports_to_id' => $contact->id, 'convert_create_Accounts' => 'false', 'account_name' => $account->name, 'account_id' => $account->id, 'handle' => 'save');
     // Call display to trigger conversion
     $vc = new ViewConvertLead();
     $vc->display();
     // Refresh Lead
     $leadId = $lead->id;
     $lead = new Lead();
     $lead->retrieve($leadId);
     // Refresh Contact
     $contactId = $contact->id;
     $contact = new Contact();
     $contact->retrieve($contactId);
     // Check if contact it's linked properly
     $this->assertEquals($contact->id, $lead->contact_id, 'Contact not linked with Lead successfully.');
     // Check if account is linked with lead properly
     $this->assertEquals($account->id, $lead->account_id, 'Account not linked with Lead successfully.');
     // Check if account is linked with contact properly
     $this->assertEquals($account->id, $contact->account_id, 'Account not linked with Contact successfully.');
     // Check Lead Status, should be converted
     $this->assertEquals('Converted', $lead->status, "Lead status should be 'Converted'.");
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:31,代码来源:Bug50127Test.php

示例4: setUp

 protected function setUp()
 {
     SugarTestHelper::setUp('beanFiles');
     SugarTestHelper::setUp('beanList');
     SugarTestHelper::setUp('current_user', array(true, 1));
     $this->contact = SugarTestContactUtilities::createContact();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:7,代码来源:Bug53516Test.php

示例5: setUp

 public function setUp()
 {
     global $current_user;
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php';
     //Clean up any possible contacts not deleted
     $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name = 'NoBlankFieldUpdate' AND last_name = 'OnFirstSyncTest'");
     $current_user = SugarTestUserUtilities::createAnonymousUser();
     $contact = SugarTestContactUtilities::createContact();
     $contact->first_name = 'NoBlankFieldUpdate';
     $contact->last_name = 'OnFirstSyncTest';
     $contact->phone_mobile = '867-5309';
     $contact->email1 = 'noblankfieldupdateonfirstsync@example.com';
     $contact->title = 'Jenny - I Got Your Number';
     $contact->disable_custom_fields = true;
     $contact->save();
     $this->c = $contact;
     $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name = 'Collin' AND last_name = 'Lee'");
     //Manually create a contact entry
     $contact2 = new Contact();
     $contact2->title = 'Jenny - I Got Your Number';
     $contact2->first_name = 'Collin';
     $contact2->last_name = 'Lee';
     $contact2->phone_mobile = '867-5309';
     $contact2->disable_custom_fields = true;
     $contact2->email1 = '';
     $contact2->email2 = '';
     $contact2->save();
     $this->c2 = $contact2;
     //DELETE contact_users entries that may have remained
     $GLOBALS['db']->query("DELETE FROM contacts_users WHERE user_id = '{$current_user->id}'");
     parent::setUp();
     $GLOBALS['db']->commit();
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:33,代码来源:NoBlankFieldUpdateOnFirstSyncTest.php

示例6: setUp

 public function setUp()
 {
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->contact = SugarTestContactUtilities::createContact();
     $this->task = SugarTestTaskUtilities::createTask();
     $this->task->contact_id = $this->contact->id;
     $this->task->save();
 }
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:8,代码来源:Bug45709Test.php

示例7: setUp

 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);
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:8,代码来源:Bug40527Test.php

示例8: setUp

 public function setUp()
 {
     global $timedate, $current_user;
     $timedate = TimeDate::getInstance();
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $current_user = SugarTestUserUtilities::createAnonymousUser();
     $this->nowTime = $timedate->asDb($timedate->getNow()->get("-10 minutes"));
     $this->tenMinutesLaterTime = $timedate->asDb($timedate->getNow()->get("+10 minutes"));
     $current_user->is_admin = 1;
     $current_user->save();
     $this->meeting = SugarTestMeetingUtilities::createMeeting();
     $this->meeting->team_id = $current_user->team_id;
     $this->meeting->team_set_id = $current_user->team_set_id;
     $this->meeting->team_id = $current_user->team_id;
     $this->meeting->team_set_id = $current_user->team_set_id;
     $this->meeting->assigned_user_id = $current_user->id;
     $this->meeting->save();
     $this->meeting->load_relationship('users');
     $this->meeting->users->add($current_user);
     $this->call = SugarTestCallUtilities::createCall();
     $this->call->team_id = $current_user->team_id;
     $this->call->team_set_id = $current_user->team_set_id;
     $this->call->assigned_user_id = $current_user->id;
     $this->call->save();
     $this->call->load_relationships('users');
     $this->call->users->add($current_user);
     $this->contact = SugarTestContactUtilities::createContact();
     $this->contact->email1 = 'mark.zuckerberg@facebook.com';
     $this->contact->contacts_users_id = $current_user->id;
     $this->contact->load_relationship('user_sync');
     $this->contact->user_sync->add($current_user);
     $this->contact->sync_contact = 1;
     $this->contact->save();
     $this->task = SugarTestTaskUtilities::createTask();
     $this->task->assigned_user_id = $current_user->id;
     $this->task->team_id = $current_user->id;
     $this->task->team_set_id = $current_user->id;
     $this->task->save();
     //$this->useOutputBuffering = false;
     /**
      * This provider returns an Array of Array data.  Each Array contains the following data
      * 0 => String - Left side module name
      * 1 => String - Right side module name
      * 2 => String - Relationship Query
      * 3 => boolean to return deleted records or not (this is actually ignored by the function)
      * 4 => integer offset to start with
      * 5 => integer value for the maximum number of results
      * 6 => array of fields to select and return
      * 7 => load_relationships - Relationship name to use
      * 8 => array of expected results
      * 9 => integer of expected total count
      * 10 => array of expected soap error
      * @return array The provider array
      */
     $this->testData = array(array('Users', 'Meetings', "( (m1.date_modified > '{$this->nowTime}' AND m1.date_modified <= '{$this->tenMinutesLaterTime}' AND m1.deleted = 0) OR (m1.date_modified > '{$this->nowTime}' AND m1.date_modified <= '{$this->tenMinutesLaterTime}' AND m1.deleted = 1) AND m1.id IN ('{$this->meeting->id}')) OR (m1.id NOT IN ('{$this->meeting->id}') AND m1.deleted = 0) AND m2.id = '{$current_user->id}'", 0, 0, 3000, $this->callsAndMeetingsSelectFields, 'meetings_users', array('id' => $this->meeting->id), 1, $this->noSoapErrorArray), array('Users', 'Calls', "( m1.deleted = 0) AND m2.id = '{$current_user->id}'", 0, 0, 3000, $this->callsAndMeetingsSelectFields, 'calls_users', array('id' => $this->call->id), 1, $this->noSoapErrorArray), array('Users', 'Contacts', "( (m1.date_modified > '{$this->nowTime}' AND m1.date_modified <= '{$this->tenMinutesLaterTime}' AND {0}.deleted = 0) OR ({0}.date_modified > '{$this->nowTime}' AND {0}.date_modified <= '{$this->tenMinutesLaterTime}' AND {0}.deleted = 1) AND m1.id IN ('31a219bd-b9c1-2c3e-aa5d-4f2778ab0347','c794bc39-e4fb-f515-f1d5-4f285ca88965','d51a0555-8f84-9e62-0fbc-4f2787b5d839','a1219ae6-5a6b-0d1b-c49f-4f2854bc2912')) OR (m1.id NOT IN ('31a219bd-b9c1-2c3e-aa5d-4f2778ab0347','c794bc39-e4fb-f515-f1d5-4f285ca88965','d51a0555-8f84-9e62-0fbc-4f2787b5d839','a1219ae6-5a6b-0d1b-c49f-4f2854bc2912') AND {0}.deleted = 0) AND m2.id = '1'", 0, 0, 3000, $this->contactsSelectFields, 'contacts_users', array('id' => $this->contact->id, 'email1' => 'mark.zuckerberg@facebook.com'), 1, $this->noSoapErrorArray), array('Users', 'Tasks', " ( (m1.date_modified > '{$this->nowTime}' AND m1.date_modified <= '{$this->tenMinutesLaterTime}' AND {0}.deleted = 0) OR ({0}.date_modified > '{$this->nowTime}' AND {0}.date_modified <= '{$this->tenMinutesLaterTime}' AND {0}.deleted = 1) AND m1.id IN ('{$this->task->id}')) OR (m1.id NOT IN ('{$this->task->id}') AND {0}.deleted = 0) AND m2.id = '1'", 0, 0, 3000, $this->tasksSelectFields, 'tasks_assigned_user', array('id' => $this->task->id), 1, $this->noSoapErrorArray));
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:58,代码来源:SoapRelationshipHelperTest.php

示例9: testDisplay

 public function testDisplay()
 {
     $view = new ViewVcard();
     $view->bean = SugarTestContactUtilities::createContact();
     $view->module = 'Contacts';
     $view->display();
     SugarTestContactUtilities::removeAllCreatedContacts();
     $this->expectOutputRegex('/BEGIN\\:VCARD/');
 }
开发者ID:newLoki,项目名称:sugarcrm_dev,代码行数:9,代码来源:ViewVcardTest.php

示例10: setUp

 public function setUp()
 {
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->_user = SugarTestUserUtilities::createAnonymousUser();
     $this->_user->status = 'Active';
     $this->_user->is_admin = 1;
     $this->_user->save();
     $this->_contact = SugarTestContactUtilities::createContact();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:9,代码来源:RESTAPIRSSTest.php

示例11: setUp

 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php';
     parent::setUp();
     $this->contact = SugarTestContactUtilities::createContact();
     $this->prospect = new Prospect();
     $this->prospect->email1 = $this->contact->email1;
     $this->prospect->save();
 }
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:9,代码来源:Bug31003Test.php

示例12: createContact

 /**
  * Create contact function
  */
 public function createContact($account_id, $account_name)
 {
     $contact = SugarTestContactUtilities::createContact();
     $contact->account_id = $account_id;
     $contact->account_name = $account_name;
     $contact->save();
     $GLOBALS['db']->commit();
     return $contact;
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:12,代码来源:Bug61159Test.php

示例13: setUp

 public function setUp()
 {
     SugarTestHelper::setUp('beanFiles');
     SugarTestHelper::setUp('beanList');
     SugarTestHelper::setUp('current_user');
     $this->Accounts = SugarTestAccountUtilities::createAccount();
     $this->Contacts = SugarTestContactUtilities::createContact();
     $this->Leads = SugarTestLeadUtilities::createLead();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:9,代码来源:Bug25736ExportTest.php

示例14: setUp

 public function setUp()
 {
     SugarTestHelper::setUp('app_list_strings');
     SugarTestHelper::setUp('app_strings');
     SugarTestHelper::setUp('current_user');
     $this->contact = SugarTestContactUtilities::createContact();
     $this->task = SugarTestTaskUtilities::createTask();
     $this->task->contact_id = $this->contact->id;
     $this->task->save();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:10,代码来源:Bug45709_53785_Test.php

示例15: setUp

 public function setUp()
 {
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->contact = SugarTestContactUtilities::createContact();
     $this->task = SugarTestTaskUtilities::createTask();
     $this->task->contact_id = $this->contact->id;
     $this->task->save();
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:10,代码来源:Bug45709Test.php


注:本文中的SugarTestContactUtilities::createContact方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。