/** * Test: To String (Magic Method) * * @access public * @return void */ public function testToString() { $hour = new Hour(new \DateTime(date('Y-m-d H:00'))); $this->assertSame($hour->getBegin()->format('G'), (string) $hour); }
/** * Test: To String (Magic Method) * * @access public * @return void */ public function testToString() { $hour = new Hour(new \DateTime(date('Y-m-d H:00')), $this->prophesize(FactoryInterface::class)->reveal()); $this->assertSame($hour->getBegin()->format('G'), (string) $hour); }