Ejemplo n.º 1
0
 public function testGetStartOfPreviousDay()
 {
     $subject = new LocalDate('2016-01-02T00:00:00', 'Europe/Berlin');
     $this->assertEquals(new LocalDate('2016-01-01', 'Europe/Berlin'), $subject->getStartOfPreviousDay());
     $subject = new LocalDate('2016-01-02T01:00:00', 'Europe/Berlin');
     $this->assertEquals(new LocalDate('2016-01-01', 'Europe/Berlin'), $subject->getStartOfPreviousDay());
     $subject = new LocalDate('2016-01-02T12:00:00', 'Europe/Berlin');
     $this->assertEquals(new LocalDate('2016-01-01', 'Europe/Berlin'), $subject->getStartOfPreviousDay());
     $subject = new LocalDate('2016-01-02T23:00:00', 'Europe/Berlin');
     $this->assertEquals(new LocalDate('2016-01-01', 'Europe/Berlin'), $subject->getStartOfPreviousDay());
     $subject = new LocalDate('2016-01-02T24:00:00', 'Europe/Berlin');
     $this->assertEquals(new LocalDate('2016-01-02', 'Europe/Berlin'), $subject->getStartOfPreviousDay());
 }