Skip to content

Commit 7f1a735

Browse files
committed
fix: use max value for dates so faker will generate same date value fro unit tests
1 parent 31aa9f6 commit 7f1a735

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/SchemaFaker/StringFaker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ private static function generateFromFormat(Schema $schema) : string
5555
{
5656
switch ($schema->format) {
5757
case 'date':
58-
return DateTime::date();
58+
return DateTime::date('Y-m-d', '2199-01-01');
5959
case 'date-time':
60-
return DateTime::dateTime()->format(DATE_RFC3339);
60+
return DateTime::dateTime('2199-01-01 00:00:00')->format(DATE_RFC3339);
6161
case 'email':
6262
return (new Internet(Factory::create()))->safeEmail();
6363
case 'uuid':
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"baz": "harum",
3-
"bar": "1984-04-06",
3+
"bar": "2034-09-26",
44
"foo": -1879644922,
55
"bap": "compact"
66
}

0 commit comments

Comments
 (0)