示例#1
0
 public function testGetDatePeriod()
 {
     $day = new Day(new \DateTime('2012-01-31'));
     foreach ($day->getDatePeriod() as $dateTime) {
         $this->assertEquals('2012-01-31', $dateTime->format('Y-m-d'));
     }
 }
示例#2
0
 public function testGetDatePeriod()
 {
     $day = new Day(new \DateTime('2012-01-31'), $this->prophesize(FactoryInterface::class)->reveal());
     foreach ($day->getDatePeriod() as $dateTime) {
         $this->assertEquals('2012-01-31', $dateTime->format('Y-m-d'));
     }
 }