Example #1
0
 public function testMidnight()
 {
     $this->assertLocalTimeIs(0, 0, 0, 0, LocalTime::midnight());
 }
Example #2
0
 /**
  * @dataProvider providerWithInvalidDayThrowsException
  * @expectedException \Brick\DateTime\DateTimeException
  *
  * @param integer $year   The base year.
  * @param integer $month  The base month.
  * @param integer $day    The base day-of-month.
  * @param integer $newDay The new day-of-month.
  */
 public function testWithInvalidDayThrowsException($year, $month, $day, $newDay)
 {
     LocalDate::of($year, $month, $day)->atTime(LocalTime::midnight())->withDay($newDay);
 }