コード例 #1
0
ファイル: Bug39756Test.php プロジェクト: delkyd/sugarcrm_dev
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     $sql = "DELETE FROM accounts where id = '{$this->_account->id}'";
     $GLOBALS['db']->query($sql);
 }
コード例 #2
0
ファイル: Bug43343Test.php プロジェクト: nickpro/sugarcrm_dev
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     unset($_REQUEST['searchDateFrom']);
     unset($_REQUEST['searchDateTo']);
 }
コード例 #3
0
ファイル: vCardTest.php プロジェクト: jgera/sugarcrm_dev
 public function tearDown()
 {
     unset($GLOBALS['current_user']);
     unset($GLOBALS['beanList']);
     unset($GLOBALS['beanFiles']);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
 }
コード例 #4
0
ファイル: Bug47406Test.php プロジェクト: delkyd/sugarcrm_dev
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($this->mbvardef);
     unset($this->smarty);
     unset($GLOBALS['current_user']);
 }
コード例 #5
0
ファイル: Bug51679Test.php プロジェクト: delkyd/sugarcrm_dev
 public function tearDown()
 {
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestHelper::tearDown();
 }
コード例 #6
0
 public function setUp()
 {
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->account = SugarTestAccountUtilities::createAccount();
     $this->account->name = "SDizzle Inc";
     $this->account->save();
 }
コード例 #7
0
ファイル: Bug50887Test.php プロジェクト: jgera/sugarcrm_dev
 public function setUp()
 {
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->user = $GLOBALS['current_user'];
     $this->user->setPreference('default_decimal_seperator', '.');
     $this->loc = new Localization();
 }
コード例 #8
0
ファイル: Bug49627Test.php プロジェクト: jgera/sugarcrm_dev
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($this->normalUser);
     unset($this->groupUser);
     unset($this->portalUser);
 }
コード例 #9
0
 public function tearDown()
 {
     $this->contact->field_defs = $this->defs;
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     SugarTestContactUtilities::removeAllCreatedContacts();
 }
コード例 #10
0
ファイル: Bug46473Test.php プロジェクト: jgera/sugarcrm_dev
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['action']);
     unset($GLOBALS['module']);
     unset($_REQUEST['module']);
 }
コード例 #11
0
ファイル: Bug41523Test.php プロジェクト: jgera/sugarcrm_dev
 public function tearDown()
 {
     // Delete created campaings
     SugarTestCampaignUtilities::removeAllCreatedCampaigns();
     // Delete users
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
 }
コード例 #12
0
ファイル: Bug47010Test.php プロジェクト: delkyd/sugarcrm_dev
 public function tearDown()
 {
     unset($_REQUEST['dropdown_name']);
     unset($_SESSION['authenticated_user_language']);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestHelper::tearDown();
 }
コード例 #13
0
ファイル: Bug49281Test.php プロジェクト: delkyd/sugarcrm_dev
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     SugarTestHelper::tearDown();
 }
コード例 #14
0
ファイル: Bug58011Test.php プロジェクト: delkyd/sugarcrm_dev
 public function testAcceptanceAfterDateUpdate()
 {
     global $current_user;
     global $db;
     $meeting = SugarTestMeetingUtilities::createMeeting();
     $user = SugarTestUserUtilities::createAnonymousUser();
     SugarTestMeetingUtilities::addMeetingUserRelation($meeting->id, $current_user->id);
     SugarTestMeetingUtilities::addMeetingUserRelation($meeting->id, $user->id);
     // set this to 'accept' before handleSave and make sure it gets set to 'none' after handleSave
     $meeting->set_accept_status($user, 'accept');
     $meeting->save();
     $_POST['record'] = $_REQUEST['record'] = $meeting->id;
     $_POST['user_invitees'] = $current_user->id . ',' . $user->id;
     $_POST['module'] = 'Meetings';
     $_POST['action'] = 'Save';
     $_POST['assigned_user_id'] = $current_user->id;
     $_POST['send_invites'] = $_REQUEST['send_invites'] = 1;
     $_POST['date_start'] = $GLOBALS['timedate']->getNow()->asDb();
     $_POST['date_end'] = $GLOBALS['timedate']->getNow()->modify("+900 seconds")->asDb();
     $formBase = new MeetingFormBase();
     $formBase->handleSave('', false, false);
     $sql = "SELECT accept_status FROM meetings_users WHERE meeting_id='{$meeting->id}' AND user_id='{$user->id}'";
     $result = $db->query($sql);
     if ($row = $db->fetchByAssoc($result)) {
         $this->assertEquals('none', $row['accept_status'], 'Should be none after date changed and invite sent.');
     }
 }
コード例 #15
0
 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();
 }
コード例 #16
0
ファイル: Bug44125Test.php プロジェクト: nickpro/sugarcrm_dev
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     $GLOBALS['db']->query("DELETE FROM schedulers WHERE id = '" . $this->testScheduler->id . "'");
     $GLOBALS['db']->query("DELETE FROM schedulers_times WHERE scheduler_id = '" . $this->testScheduler->id . "'");
 }
コード例 #17
0
 public function setup()
 {
     global $current_user;
     $current_user = SugarTestUserUtilities::createAnonymousUser();
     //for the purpose of this test, we need to create a campaign and relate it to a campaign tracker object
     //create campaign
     $c = new Campaign();
     $c->name = 'CT test ' . time();
     $c->campaign_type = 'Email';
     $c->status = 'Active';
     $timeDate = new TimeDate();
     $c->end_date = $timeDate->to_display_date(date('Y') + 1 . '-01-01');
     $c->assigned_id = $current_user->id;
     $c->team_id = '1';
     $c->team_set_id = '1';
     $c->save();
     $this->campaign = $c;
     //create campaign tracker
     $ct = new CampaignTracker();
     $ct->tracker_name = 'CampaignTrackerTest' . time();
     $ct->tracker_url = 'sugarcrm.com';
     $ct->campaign_id = $this->campaign->id;
     $ct->save();
     $this->campaign_tracker = $ct;
 }
コード例 #18
0
ファイル: Bug41058Test.php プロジェクト: thsonvt/sugarcrm_dev
 public function tearDown()
 {
     global $sugar_config, $sugar_version, $mod_strings;
     if (file_exists($this->loc->invalidNameFormatUpgradeFilename)) {
         unlink($this->loc->invalidNameFormatUpgradeFilename);
     }
     if (file_exists($this->loc->invalidNameFormatUpgradeFilename . '.backup')) {
         rename($this->loc->invalidNameFormatUpgradeFilename . '.backup', $this->loc->invalidNameFormatUpgradeFilename);
     }
     unset($this->loc);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($this->user);
     unset($GLOBALS['current_user']);
     $sugar_config = $this->backupConfig;
     if (!rebuildConfigFile($sugar_config, $sugar_version)) {
         logThis('*** ERROR: could not write config.php!');
         $errors[] = $mod_strings['ERR_UW_CONFIG_WRITE'];
     }
     unset($this->backupSystemLocaleNameFormat);
     unset($sugar_config);
     unset($sugar_version);
     unset($mod_strings);
     unset($app_strings);
     unset($app_list_strings);
     unset($locale);
     unset($_REQUEST);
 }
コード例 #19
0
 public function tearDown()
 {
     unset($_SESSION[$GLOBALS['current_user']->user_name . '_PREFERENCES']);
     unset($GLOBALS['current_user']);
     unset($_SESSION[$this->_user->user_name . '_PREFERENCES']);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
 }
コード例 #20
0
ファイル: Bug39757Test.php プロジェクト: nickpro/sugarcrm_dev
 public function tearDown()
 {
     $sql = "DELETE FROM MEETINGS WHERE id = '{$this->_meetingId}'";
     $GLOBALS['db']->query($sql);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
 }
コード例 #21
0
ファイル: Bug44113Test.php プロジェクト: rgauss/sugarcrm_dev
 public function setUp()
 {
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['current_user']->is_admin = '1';
     // email_xss settings to be saved using config_override
     $this->email_xss = array('applet' => 'applet', 'form' => 'form', 'iframe' => 'iframe', 'script' => 'script');
 }
コード例 #22
0
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     $GLOBALS['db']->query("DELETE FROM folders WHERE id='{$this->folder_id}'");
     unset($this->ie);
 }
コード例 #23
0
ファイル: Bug42915Test.php プロジェクト: nickpro/sugarcrm_dev
 public function tearDown()
 {
     $GLOBALS['db']->query("DELETE FROM saved_search where id = '{$this->saved_search_id}'");
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     global $current_user;
     $current_user = $this->previousCurrentUser;
 }
コード例 #24
0
ファイル: Bug46276Test.php プロジェクト: thsonvt/sugarcrm_dev
 public function tearDown()
 {
     $GLOBALS['db']->query('DELETE FROM opportunities WHERE id = \'' . $this->opportunities->id . '\' ');
     unset($this->opportunities);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestHelper::tearDown();
 }
コード例 #25
0
 public function setUp()
 {
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['current_user']->setPreference('timezone', "America/Los_Angeles");
     $GLOBALS['current_user']->setPreference('datef', "m/d/Y");
     $GLOBALS['current_user']->setPreference('timef', "h.iA");
 }
コード例 #26
0
 public function tearDown()
 {
     $GLOBALS['db']->query("DELETE FROM contacts WHERE id= '{$this->_contact->id}'");
     unset($this->_contact);
     if ($this->_hasUnifiedSearchModulesConfig) {
         copy(sugar_cached('modules/unified_search_modules.php.bak'), sugar_cached('modules/unified_search_modules.php'));
         unlink(sugar_cached('modules/unified_search_modules.php.bak'));
     } else {
         unlink(sugar_cached('modules/unified_search_modules.php'));
     }
     if ($this->_hasUnifiedSearchModulesDisplay) {
         copy('custom/modules/unified_search_modules_display.php.bak', 'custom/modules/unified_search_modules_display.php');
         unlink('custom/modules/unified_search_modules_display.php.bak');
     } else {
         unlink('custom/modules/unified_search_modules_display.php');
     }
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     if (isset($_REQUEST['module'])) {
         unset($_REQUEST['module']);
     }
     if (isset($_REQUEST['query_string'])) {
         unset($_REQUEST['query_string']);
     }
     if (isset($_REQUEST['enabled_modules'])) {
         unset($_REQUEST['enabled_modules']);
     }
 }
コード例 #27
0
ファイル: Bug49896Test.php プロジェクト: jgera/sugarcrm_dev
 public function tearDown()
 {
     if (!empty($this->_passwordSetting)) {
         $GLOBALS['sugar_config']['passwordsetting'] = $this->_passwordSetting;
     }
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
 }
コード例 #28
0
ファイル: ListViewTest.php プロジェクト: jgera/sugarcrm_dev
 public function tearDown()
 {
     unset($this->_lv);
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
     unset($GLOBALS['app_strings']);
 }
コード例 #29
0
ファイル: Bug48748Test.php プロジェクト: jgera/sugarcrm_dev
 public function setUp()
 {
     parent::setUp();
     //If somehow this package already exists copy it
     if (file_exists('custom/modules/' . $this->package)) {
         $this->packageExists = true;
         mkdir_recursive('custom/modules/' . $this->package . '_bak');
         copy_recursive('custom/modules/' . $this->package, 'custom/modules/' . $this->package . '_bak');
     }
     //Make the custom package directory and simulate copying the file in
     mkdir_recursive('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs');
     $theArray = array($this->package => array('subpanel_setup' => array($this->package . '_accounts' => array('order' => 100, 'module' => 'Contacts', 'subpanel_name' => 'default', 'title_key' => 'LBL_BUG48784TEST', 'get_subpanel_data' => 'Bug48748Test'))));
     $theFile = 'custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php';
     write_array_to_file('layout_defs', $theArray, $theFile);
     sugar_chmod('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php', 0655);
     global $beanList, $beanFiles, $current_user;
     //$beanList['Contacts'] = 'Contact';
     //$beanFiles['Bug48784Mock'] = 'modules/Contacts/Contact.php';
     //Create an anonymous user for login purposes/
     $current_user = SugarTestUserUtilities::createAnonymousUser();
     $current_user->status = 'Active';
     $current_user->is_admin = 1;
     $current_user->save();
     $GLOBALS['db']->commit();
     // Making sure we commit any changes before continuing
     $_SESSION['avail_modules'][$this->package] = 'write';
 }
コード例 #30
0
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestLeadUtilities::removeAllCreatedLeads();
     SugarTestLeadUtilities::removeCreatedLeadsEmailAddresses();
     unset($this->form);
     unset($this->lead1);
 }