public function itComputesTheTimestamp3DaysInTheFutureAtMidnight() { $expected_time = strtotime('+3 days', $this->today_at_midnight); $this->assertEqual($expected_time, DateHelper::getTimestampAtMidnight("+3 days")); }
/** * Get artifacts that will send notification for a reminder * * @param Tracker_DateReminder $reminder Reminder on which the notification is based on * * @return Array */ public function getArtifactsByreminder(Tracker_DateReminder $reminder) { $time_string = '-'; if ($reminder->getNotificationType() == 0) { $time_string = '+'; } $time_string .= $reminder->getDistance() . ' days'; $date = DateHelper::getTimestampAtMidnight($time_string); $field = $reminder->getField(); return $field->getArtifactsByCriterias($date, $this->getTracker()->getId()); }