Exemple #1
0
 /**
  * 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);
 }
Exemple #2
0
 /**
  * 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);
 }