tests/Service/GlobalClockTest.php
/**
     * @expectedException Exception DateTime Emits Exception in case of an error.
     */
@expectedException Exception DateTime Emits Exception in case of an error.
@expectedException Exception DateTime Emits Exception in case of an error .
public function testGetNowInDateTimeMethodReturningACurrentDateTime(): void
    {
        $this->assertInstanceOf('Datetime', $this->clock->getNowInDateTime());
        $this->assertEqualsWithDelta(new DateTime('now'), $this->clock->getNowInDateTime(), 5.0);
    }
public function testGetNowInDateTimeMethodReturningACurrentDateTime ( ) : void { $ this -> assertInstanceOf ( 'Datetime' , $ this -> clock -> getNowInDateTime ( ) ) ; $ this -> assertEqualsWithDelta ( new DateTime ( 'now' ) , $ this -> clock -> getNowInDateTime ( ) , 5.0 ) ; }
@expectedException Exception DateTime Emits Exception in case of an error.
@expectedException Exception DateTime Emits Exception in case of an error .