/**
  * Create test user
  *
  */
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v2/soap.php';
     SugarTestAccountUtilities::createAccount();
     SugarTestAccountUtilities::createAccount();
     parent::setUp();
 }
Beispiel #2
0
 /**
  * Create test account
  *
  */
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v3_1/soap.php';
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->acc = SugarTestAccountUtilities::createAccount();
     parent::setUp();
 }
Beispiel #3
0
 /**
  * Create test user
  *
  */
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v3/soap.php';
     parent::setUp();
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     self::$helperObject = new APIv3Helper();
 }
Beispiel #4
0
 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();
 }
 /**
  * Create test user
  *
  */
 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->_setupTestContact();
     $this->_meeting = SugarTestMeetingUtilities::createMeeting();
 }
Beispiel #6
0
 /**
  * Create test user
  *
  */
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php';
     parent::setUp();
     $beanList = array();
     $beanFiles = array();
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $this->_setupTestContact();
 }
Beispiel #7
0
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v4_1/soap.php';
     parent::setUp();
     $this->_login();
     // Logging in just before the SOAP call as this will also commit any pending DB changes
     for ($x = 0; $x < 4; $x++) {
         $mid = SugarTestMeetingUtilities::createMeeting();
         SugarTestMeetingUtilities::addMeetingUserRelation($mid->id, self::$_user->id);
     }
     $GLOBALS['db']->commit();
 }
Beispiel #8
0
 /**
  * Create test user
  *
  */
 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->_meeting = SugarTestMeetingUtilities::createMeeting();
     $GLOBALS['db']->commit();
     // Making sure these changes are committed to the database
 }
Beispiel #9
0
 public function setUp()
 {
     SugarTestHelper::setUp('beanFiles');
     SugarTestHelper::setUp('beanList');
     SugarTestHelper::setUp('current_user');
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v4_1/soap.php';
     parent::_setupTestUser();
     parent::setUp();
     $this->account = SugarTestAccountUtilities::createAccount();
     $this->contact = SugarTestContactUtilities::createContact();
     $this->account->load_relationship('contacts');
     $this->account->contacts->add($this->contact->id);
 }
Beispiel #10
0
 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");
 }
Beispiel #11
0
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php';
     parent::setUp();
     $unid = uniqid();
     $time = date('Y-m-d H:i:s');
     $contact = new Contact();
     $contact->id = 'c_' . $unid;
     $contact->first_name = 'testfirst';
     $contact->last_name = 'testlast';
     $contact->email1 = '*****@*****.**';
     $contact->email2 = '*****@*****.**';
     $contact->new_with_id = true;
     $contact->disable_custom_fields = true;
     $contact->save();
     $GLOBALS['db']->commit();
     $this->c = $contact;
 }
Beispiel #12
0
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v2/soap.php';
     SugarTestHelper::setUp('beanFiles');
     SugarTestHelper::setUp('beanList');
     SugarTestHelper::setUp('current_user', array(true, 1));
     $this->field = get_widget('varchar');
     $this->field->id = 'Accountstest_custom_c';
     $this->field->name = 'test_custom_c';
     $this->field->vanme = 'LBL_TEST_CUSTOM_C';
     $this->field->comments = NULL;
     $this->field->help = NULL;
     $this->field->custom_module = 'Accounts';
     $this->field->type = 'varchar';
     $this->field->label = 'LBL_TEST_CUSTOM_C';
     $this->field->len = 255;
     $this->field->required = 0;
     $this->field->default_value = NULL;
     $this->field->date_modified = '2009-09-14 02:23:23';
     $this->field->deleted = 0;
     $this->field->audited = 0;
     $this->field->massupdate = 0;
     $this->field->duplicate_merge = 0;
     $this->field->reportable = 1;
     $this->field->importable = 'true';
     $this->field->ext1 = NULL;
     $this->field->ext2 = NULL;
     $this->field->ext3 = NULL;
     $this->field->ext4 = NULL;
     $this->df = new DynamicField('Accounts');
     $this->mod = new Account();
     $this->df->setup($this->mod);
     $this->df->addFieldObject($this->field);
     $this->df->buildCache('Accounts');
     VardefManager::clearVardef();
     VardefManager::refreshVardefs('Accounts', 'Account');
     $this->mod->field_defs = $GLOBALS['dictionary']['Account']['fields'];
     $this->_account = SugarTestAccountUtilities::createAccount();
     $this->_account->test_custom_c = 'Custom Field';
     $this->_account->save();
     $GLOBALS['db']->commit();
     // Making sure we commit any changes
     parent::setUp();
 }
 public function setUp()
 {
     $this->markTestIncomplete("Test breaking on CI, working with dev to fix");
     $administration = new Administration();
     $administration->retrieveSettings();
     if (isset($administration->settings['portal_on'])) {
         $this->_opt = $administration->settings['portal_on'];
     }
     $administration->saveSetting('portal', 'on', 1);
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php?wsdl';
     parent::setUp();
     $this->_login();
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $this->_contact = new Contact();
     $this->_contact->last_name = "Contact #bug51723";
     $this->_contact->id = create_guid();
     $this->_contact->new_with_id = true;
     $this->_contact->team_id = 1;
     $this->_contact->save();
 }
Beispiel #14
0
 /**
  * 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']);
 }
Beispiel #15
0
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v2/soap.php';
     parent::setUp();
 }
Beispiel #16
0
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/soap.php?XDEBUG_SESSION_START=michael';
     parent::setUp();
 }
Beispiel #17
0
 public function setUp()
 {
     $this->definition = array('id' => 'a3468352-8fd0-ec13-708a-517087f79ada', 'relationship_name' => 'accounts_meetings_1', 'lhs_module' => 'Accounts', 'lhs_table' => 'accounts', 'lhs_key' => 'id', 'rhs_module' => 'Meetings', 'rhs_table' => 'meetings', 'rhs_key' => 'id', 'join_table' => 'accounts_meetings_1_c', 'join_key_lhs' => 'accounts_meetings_1accounts_ida', 'join_key_rhs' => 'accounts_meetings_1meetings_idb', 'relationship_type' => 'one-to-many', 'relationship_role_column' => '', 'relationship_role_column_value' => '', 'reverse' => 0, 'deleted' => 0, 'readonly' => 1, 'rhs_subpanel' => '', 'lhs_subpanel' => '', 'from_studio' => 1, 'is_custom' => 1);
     parent::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 = '*****@*****.**';
     $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();
 }