/** * Test: Is Current * * @access public * @return void */ public function testIsCurrent() { $currentSecond = new Second(new \DateTime(date('Y-m-d H:i:s'))); $otherSecond = new Second(new \DateTime('1988-11-12 16:00:50')); $this->assertTrue($currentSecond->isCurrent()); $this->assertFalse($otherSecond->isCurrent()); }
/** * Test: Is Current * * @access public * @return void */ public function testIsCurrent() { $currentSecond = new Second(new \DateTime(date('Y-m-d H:i:s')), $this->prophesize(FactoryInterface::class)->reveal()); $otherSecond = new Second(new \DateTime('1988-11-12 16:00:50'), $this->prophesize(FactoryInterface::class)->reveal()); $this->assertTrue($currentSecond->isCurrent()); $this->assertFalse($otherSecond->isCurrent()); }