Ejemplo n.º 1
0
 public function testMax()
 {
     $subject = new LocalDate('2016-02-08T00:00:01', 'Europe/Berlin');
     $compare = new LocalDate('2016-02-08T00:00:00', 'Europe/Berlin');
     $this->assertEquals($subject->format('c'), $subject->max($compare)->format('c'));
     $subject = new LocalDate('2016-02-08T00:00:01', 'Europe/Berlin');
     $compare = new LocalDate('2016-02-08T00:00:02', 'Europe/Berlin');
     $this->assertEquals($compare->format('c'), $subject->max($compare)->format('c'));
     $subject = new LocalDate('2016-02-08T00:00:01', 'Europe/Berlin');
     $compare = new \DateTime('2016-02-08T00:00:00', new \DateTimeZone('Europe/Berlin'));
     $this->assertEquals($subject->format('c'), $subject->max($compare)->format('c'));
 }