Add test for getting nextRecurrence of an event with a start date < 2010 and
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 9 Aug 2010 22:01:49 +0000 (18:01 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 9 Aug 2010 22:01:49 +0000 (18:01 -0400)
a recurs after date of 1/1/2010.

framework/Date/test/Horde/Date/RecurrenceTest.php

index 85d2cf2..45d18c8 100644 (file)
@@ -315,6 +315,19 @@ class Horde_Date_RecurrenceTest extends PHPUnit_Framework_TestCase
                             $recurrences);
     }
 
+    public function testWeeklyISOWeek53()
+    {
+        $r = new Horde_Date_Recurrence('2009-06-09 10:00:00');
+        $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY);
+        $r->setRecurOnDay(Horde_Date::MASK_TUESDAY);
+        $r->setRecurInterval(1);
+
+        $recurrences = array();
+        $after = new Horde_Date('1/1/2010');
+        $after = (string)$r->nextRecurrence($after);
+        $this->assertEquals('2010-01-05 10:00:00', $after);
+    }
+
     public function testMonthlyEnd()
     {
         $r = new Horde_Date_Recurrence('2007-03-01 10:00:00');