public function testEarlierThan()
 {
     $object1 = DateTimeOfDay::create(Date::create(2005, 10, 11), TimeOfDay::create(15, 13, 13));
     $object2 = DateTimeOfDay::create(Date::create(2005, 10, 11), TimeOfDay::create(15, 12, 13));
     static::assertFalse($object1->earlierThan($object2));
     $object1 = DateTimeOfDay::create(Date::create(2005, 10, 11), TimeOfDay::create(15, 12, 13));
     $object2 = DateTimeOfDay::create(Date::create(2005, 10, 11), TimeOfDay::create(15, 12, 13));
     static::assertFalse($object1->earlierThan($object2));
     $object1 = DateTimeOfDay::create(Date::create(2005, 10, 11), TimeOfDay::create(15, 11, 13));
     $object2 = DateTimeOfDay::create(Date::create(2005, 10, 11), TimeOfDay::create(15, 12, 13));
     static::assertTrue($object1->earlierThan($object2));
 }
Beispiel #2
0
 public function validProvider()
 {
     return [[Date::create(2015, 6, 15), Date::create(2015, 6, 17), Duration::create(0, 0, 2, 0, 0, 0), '2015-06-15T00:00:00/2015-06-17T00:00:00'], [DateTimeOfDay::create(Date::create(2012, 6, 17), TimeOfDay::create(23, 1, 0)), DateTimeOfDay::create(Date::create(2015, 6, 17), TimeOfDay::create(23, 2, 0)), Duration::create(3, 0, 0, 0, 1, 0)], [Date::create(2015, 6, 15), Duration::create(0, 1, 5, 0, 0, 0), Duration::create(0, 1, 5, 0, 0, 0)], [Duration::create(0, 5, 12, 0, 0, 0), Date::create(2015, 6, 17), Duration::create(0, 5, 12, 0, 0, 0), '2015-01-05T00:00:00/2015-06-17T00:00:00']];
 }