value() публичный статический Метод

Returns Faker value.
public static value ( string $type = self::TYPE_STRING, string $methodName = '', null $format = null ) : mixed
$type string model's attribute type
$methodName string model's attribute type trying to match Faker's method name
$format null custom data format used in Faker
Результат mixed
Пример #1
0
 public function testValueWithTimestampType()
 {
     $value = GiiantFaker::value(GiiantFaker::TYPE_TIMESTAMP);
     $this->specify('returned value is string containing timestamp', function () use($value) {
         expect('value is not empty', $value)->notEmpty();
         expect('value is string', is_string($value))->true();
         \DateTime::createFromFormat(GiiantFaker::FORMAT_TIMESTAMP, $value);
     });
 }