Example #1
0
 public function tearDown()
 {
     SugarTestCallUtilities::removeAllCreatedCalls();
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestTaskUtilities::removeAllCreatedTasks();
     SugarTestHelper::tearDown();
 }
 /**
  * Remove anything that was used during this test
  *
  */
 public function tearDown()
 {
     SugarTestContactUtilities::removeCreatedContactsUsersRelationships();
     $this->_contact = null;
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestMeetingUtilities::removeMeetingContacts();
     $this->_meeting = null;
     parent::tearDown();
 }
Example #3
0
 protected function tearDown()
 {
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestContactUtilities::removeCreatedContactsEmailAddresses();
     SugarTestContactUtilities::removeCreatedContactsUsersRelationships();
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestMeetingUtilities::removeMeetingContacts();
     SugarTestMeetingUtilities::removeMeetingUsers();
     SugarTestHelper::tearDown();
 }
Example #4
0
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestMeetingUtilities::removeMeetingUsers();
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestTaskUtilities::removeAllCreatedTasks();
     SugarTestProjectUtilities::removeAllCreatedProjects();
     SugarTestProjectTaskUtilities::removeAllCreatedProjectTasks();
     unset($this->timedate);
     unset($this->project);
     unset($GLOBALS['current_user']);
 }
Example #5
0
 function tearDown()
 {
     global $db, $current_user;
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestCallUtilities::removeAllCreatedCalls();
     $this->meeting = null;
     $this->call = null;
     $meetingsSql = "UPDATE meetings SET date_end = date_add(date_start, INTERVAL - CONCAT(duration_hours, ':', duration_minutes) HOUR_MINUTE)";
     $callsSql = "UPDATE calls SET date_end = date_add(date_start, INTERVAL - CONCAT(duration_hours, ':', duration_minutes) HOUR_MINUTE)";
     $db->query($meetingsSql);
     $db->query($callsSql);
     $current_user = $this->original_current_user;
 }
 function tearDown()
 {
     global $db, $current_user;
     if ($db->dbType != 'mysql') {
         return;
     }
     // No need to clean up if we skipped the test to begin with
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestCallUtilities::removeAllCreatedCalls();
     $this->meeting = null;
     $this->call = null;
     $meetingsSql = "UPDATE meetings SET date_end = date_add(date_start, INTERVAL + CONCAT(duration_hours, ':', duration_minutes) HOUR_MINUTE)";
     $callsSql = "UPDATE calls SET date_end = date_add(date_start, INTERVAL + CONCAT(duration_hours, ':', duration_minutes) HOUR_MINUTE)";
     $db->query($meetingsSql);
     $db->query($callsSql);
     $current_user = $this->original_current_user;
 }
Example #7
0
 public function tearDown()
 {
     SugarTestContactUtilities::removeCreatedContactsUsersRelationships();
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestMeetingUtilities::removeMeetingContacts();
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestCallUtilities::removeAllCreatedCalls();
     unset($GLOBALS['beanList']);
     unset($GLOBALS['beanFiles']);
     unset($GLOBALS['app_list_strings']);
     unset($GLOBALS['app_strings']);
     unset($GLOBALS['mod_strings']);
     unset($GLOBALS['current_user']);
 }
Example #8
0
 public function testMeetingsUsersRelationships()
 {
     global $current_user;
     $bean = SugarTestMeetingUtilities::createMeeting();
     $convert_lead = SugarTestViewConvertLeadUtilities::createViewConvertLead();
     if ($bean->object_name == "Meeting") {
         $convert_lead->setMeetingsUsersRelationship($bean);
     }
     $this->assertTrue(is_object($bean->users), "Relationship wasn't set.");
     SugarTestMeetingUtilities::removeMeetingUsers();
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
 }
Example #9
0
 public function tearDown()
 {
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
 }
Example #10
0
 public function tearDown()
 {
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestMeetingUtilities::removeMeetingUsers();
     parent::tearDown();
 }
 public function tearDown()
 {
     global $current_user;
     $GLOBALS['db']->query("DELETE FROM meetings_users WHERE user_id = '{$current_user->id}'");
     $GLOBALS['db']->query("DELETE FROM calls_users WHERE user_id = '{$current_user->id}'");
     $GLOBALS['db']->query("DELETE FROM contacts_users WHERE user_id = '{$current_user->id}'");
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestCallUtilities::removeAllCreatedCalls();
     SugarTestContactUtilities::removeAllCreatedContacts();
     SugarTestTaskUtilities::removeAllCreatedTasks();
     unset($GLOBALS['current_user']);
     unset($GLOBALS['beanFiles']);
     unset($GLOBALS['beanList']);
 }