/**
  * @expectedException \Celest\DateTimeException
  */
 public function test_factory_of_6intsMonth_nanoTooHigh()
 {
     LocalDateTime::ofMonth(2007, Month::JULY(), 15, 12, 30, 40, 1000000000);
 }
 public function test_factory_intMonth()
 {
     $this->assertEquals(self::TEST_07_15(), MonthDay::ofMonth(Month::JULY(), 15));
 }
 public function test_factory_of_intsMonth()
 {
     $this->assertEquals(self::TEST_2007_07_15(), LocalDate::ofMonth(2007, Month::JULY(), 15));
 }
Example #4
0
 public function test_toString()
 {
     $this->assertEquals(Month::JANUARY()->__toString(), "JANUARY");
     $this->assertEquals(Month::FEBRUARY()->__toString(), "FEBRUARY");
     $this->assertEquals(Month::MARCH()->__toString(), "MARCH");
     $this->assertEquals(Month::APRIL()->__toString(), "APRIL");
     $this->assertEquals(Month::MAY()->__toString(), "MAY");
     $this->assertEquals(Month::JUNE()->__toString(), "JUNE");
     $this->assertEquals(Month::JULY()->__toString(), "JULY");
     $this->assertEquals(Month::AUGUST()->__toString(), "AUGUST");
     $this->assertEquals(Month::SEPTEMBER()->__toString(), "SEPTEMBER");
     $this->assertEquals(Month::OCTOBER()->__toString(), "OCTOBER");
     $this->assertEquals(Month::NOVEMBER()->__toString(), "NOVEMBER");
     $this->assertEquals(Month::DECEMBER()->__toString(), "DECEMBER");
 }