1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/date/tests/DateTimeImmutable_modify_invalid_format.phpt
2023-02-08 10:27:33 +00:00

16 lines
379 B
PHP

--TEST--
DateTimeImmutable::modify() with invalid format
--FILE--
<?php
$datetime = new DateTimeImmutable;
try {
var_dump($datetime->modify(''));
} catch (DateMalformedStringException $e) {
echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECTF--
DateMalformedStringException: DateTimeImmutable::modify(): Failed to parse time string () at position 0 ( ): Empty string