@@ -420,15 +420,45 @@ public static function providerTestInvalidDates(): array {
return[
// Test for invalid month names when we are using a short version
// of the month.
['23 abc 2012',NULL,'d M Y',"23 abc 2012 contains an invalid month name and did not produce errors.",\InvalidArgumentException::class],
[
'23 abc 2012',
NULL,
'd M Y',
"23 abc 2012 contains an invalid month name and did not produce errors.",
\InvalidArgumentException::class,
],
// Test for invalid hour.
['0000-00-00T45:30:00',NULL,'Y-m-d\TH:i:s',"0000-00-00T45:30:00 contains an invalid hour and did not produce errors.",\UnexpectedValueException::class],
[
'0000-00-00T45:30:00',
NULL,
'Y-m-d\TH:i:s',
"0000-00-00T45:30:00 contains an invalid hour and did not produce errors.",
\UnexpectedValueException::class,
],
// Test for invalid day.
['0000-00-99T05:30:00',NULL,'Y-m-d\TH:i:s',"0000-00-99T05:30:00 contains an invalid day and did not produce errors.",\UnexpectedValueException::class],
[
'0000-00-99T05:30:00',
NULL,
'Y-m-d\TH:i:s',
"0000-00-99T05:30:00 contains an invalid day and did not produce errors.",
\UnexpectedValueException::class,
],
// Test for invalid month.
['0000-75-00T15:30:00',NULL,'Y-m-d\TH:i:s',"0000-75-00T15:30:00 contains an invalid month and did not produce errors.",\UnexpectedValueException::class],
[
'0000-75-00T15:30:00',
NULL,
'Y-m-d\TH:i:s',
"0000-75-00T15:30:00 contains an invalid month and did not produce errors.",
\UnexpectedValueException::class,
],
// Test for invalid year.
['11-08-01T15:30:00',NULL,'Y-m-d\TH:i:s',"11-08-01T15:30:00 contains an invalid year and did not produce errors.",\UnexpectedValueException::class],
[
'11-08-01T15:30:00',
NULL,
'Y-m-d\TH:i:s',
"11-08-01T15:30:00 contains an invalid year and did not produce errors.",
\UnexpectedValueException::class,
],
];
}
@@ -446,17 +476,76 @@ public static function providerTestInvalidDates(): array {