formatAsString() public method

Format the value as a string.
public formatAsString ( ) : string
return string
 public function testToString()
 {
     $value = new \DateTime();
     $time = new Time($value);
     $expected = $value->format('H:i:s.u');
     $this->assertEquals($expected, (string) $time);
     $this->assertEquals($expected, $time->formatAsString());
 }