示例#1
0
 /**
  * Test: Is Current?
  *
  * @access public
  * @return void
  */
 public function testIsCurrent()
 {
     $currentHour = new Hour(new \DateTime(date('Y-m-d H:00')));
     $otherHour = new Hour(new \DateTime('1988-11-12 16:00'));
     $this->assertTrue($currentHour->isCurrent());
     $this->assertFalse($otherHour->isCurrent());
 }
示例#2
0
 public function testIsCurrent()
 {
     $currentHour = new Hour(new \DateTime(date('Y-m-d H:00')), $this->prophesize(FactoryInterface::class)->reveal());
     $otherHour = new Hour(new \DateTime('1988-11-12 16:00'), $this->prophesize(FactoryInterface::class)->reveal());
     $this->assertTrue($currentHour->isCurrent());
     $this->assertFalse($otherHour->isCurrent());
 }