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

date() 공개 정적인 메소드

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

Usage Example

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