Ejemplo n.º 1
0
 public function test_factory_ofWeeks_int()
 {
     $this->assertPeriod(Period::ofWeeks(0), 0, 0, 0);
     $this->assertPeriod(Period::ofWeeks(1), 0, 0, 7);
     $this->assertPeriod(Period::ofWeeks(234), 0, 0, 234 * 7);
     $this->assertPeriod(Period::ofWeeks(-100), 0, 0, -100 * 7);
     $this->assertPeriod(Period::ofWeeks(Math::div(Integer::MAX_VALUE, 7)), 0, 0, Math::div(Integer::MAX_VALUE, 7) * 7);
     $this->assertPeriod(Period::ofWeeks(Math::div(Integer::MIN_VALUE, 7)), 0, 0, Math::div(Integer::MIN_VALUE, 7) * 7);
 }