public function testWeeks() { $ci = new Interval(0, 0, 1); $this->assertInstanceOfInterval($ci); $this->assertInterval($ci, 0, 0, 7, 0, 0, 0); $ci = Interval::weeks(2); $this->assertInstanceOfInterval($ci); $this->assertInterval($ci, 0, 0, 14, 0, 0, 0); $ci = Interval::week(); $this->assertInstanceOfInterval($ci); $this->assertInterval($ci, 0, 0, 7, 0, 0, 0); $ci = Interval::week(3); $this->assertInstanceOfInterval($ci); $this->assertInterval($ci, 0, 0, 21, 0, 0, 0); }
public function testFluentSettersDaysOverwritesWeeks() { $ci = Interval::weeks(3)->days(5); $this->assertInterval($ci, 0, 0, 5, 0, 0, 0); }