예제 #1
0
 /**
  * Test: Get Date Period
  *
  * @access public
  * @return void
  */
 public function testGetDatePeriod()
 {
     $minute = new Minute(new \DateTime('2012-01-31 13:12'));
     $i = 0;
     foreach ($minute->getDatePeriod() as $dateTime) {
         $i++;
         $this->assertEquals('2012-01-31 13:12', $dateTime->format('Y-m-d H:i'));
     }
     $this->assertSame(60, $i);
 }
예제 #2
0
 public function testGetDatePeriod()
 {
     $minute = new Minute(new \DateTime('2012-01-31 13:12'), $this->prophesize(FactoryInterface::class)->reveal());
     $i = 0;
     foreach ($minute->getDatePeriod() as $dateTime) {
         $i++;
         $this->assertEquals('2012-01-31 13:12', $dateTime->format('Y-m-d H:i'));
     }
     $this->assertSame(60, $i);
 }