schmunk42\giiant\helpers\GiiantFaker::date PHP Method

date() public static method

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

Usage Example

コード例 #1
0
ファイル: GiiantFakerTest.php プロジェクト: ICHydro/anaconda
 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);
     });
 }