Exemplo n.º 1
0
 public function tearDown()
 {
     SugarTestCallUtilities::removeAllCreatedCalls();
     SugarTestMeetingUtilities::removeAllCreatedMeetings();
     SugarTestTaskUtilities::removeAllCreatedTasks();
     SugarTestHelper::tearDown();
 }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
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']);
 }
Exemplo n.º 5
0
 public function tearDown()
 {
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     SugarTestCallUtilities::removeAllCreatedCalls();
 }
 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']);
 }