schmunk42\giiant\helpers\GiiantFaker::time PHP 메소드

time() 공개 정적인 메소드

public static time ( null $format = null ) : mixed
$format null - Custom format
리턴 mixed
    public static function time($format = null)
    {
        return self::value(self::TYPE_TIME, $format);
    }

Usage Example

예제 #1
0
 public function testTimeMethod()
 {
     $value = GiiantFaker::time();
     $this->specify('returned value is string as time', function () use($value) {
         expect('value is not empty', $value)->notEmpty();
         expect('value is string', is_string($value))->true();
         \DateTime::createFromFormat(GiiantFaker::FORMAT_TIME, $value);
     });
 }