call = SugarTestCallUtilities::createCall(); $this->useOutputBuffering = false; } public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); SugarTestCallUtilities::removeAllCreatedCalls(); } public function testCallAppearsWithinMonthView() { $this->markTestSkipped('Skipping for now. Communicated with Yuri about properly resolving this since eCalendar moves out the get_occurs_within_where clause to CalendarActivity.php'); global $timedate,$sugar_config,$DO_USER_TIME_OFFSET , $current_user; $DO_USER_TIME_OFFSET = true; $timedate = TimeDate::getInstance(); $format = $current_user->getUserDateTimePreferences(); $name = 'Bug37953Test' . $timedate->nowDb(); $this->call->name = $name; $this->call->date_start = $timedate->swap_formats("2011-09-29 11:00pm" , 'Y-m-d h:ia', $format['date'].' '.$format['time']); $this->call->time_start = ""; $this->call->object_name = "Call"; $this->call->duration_hours = 99; $ca = new CalendarActivity($this->call); $where = $ca->get_occurs_within_where_clause($this->call->table_name, $this->call->rel_users_table, $ca->start_time, $ca->end_time, 'date_start', 'month'); $this->assertRegExp('/2011\-09\-23 00:00:00/', $where, 'Assert that we go back 6 days from the date_start value'); $this->assertRegExp('/2011\-11\-01 00:00:00/', $where, 'Assert that we go to the end of next month'); } }