예제 #1
0
파일: ConstructTest.php 프로젝트: hmlb/date
 public function testDays()
 {
     $ci = new Interval(0, 0, 0, 1);
     $this->assertInstanceOfInterval($ci);
     $this->assertInterval($ci, 0, 0, 1, 0, 0, 0);
     $ci = Interval::days(2);
     $this->assertInstanceOfInterval($ci);
     $this->assertInterval($ci, 0, 0, 2, 0, 0, 0);
     $ci = Interval::dayz(2);
     $this->assertInstanceOfInterval($ci);
     $this->assertInterval($ci, 0, 0, 2, 0, 0, 0);
     $ci = Interval::day();
     $this->assertInstanceOfInterval($ci);
     $this->assertInterval($ci, 0, 0, 1, 0, 0, 0);
     $ci = Interval::day(3);
     $this->assertInstanceOfInterval($ci);
     $this->assertInterval($ci, 0, 0, 3, 0, 0, 0);
 }