diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-18 11:39:16 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-18 11:39:16 +0100 |
| commit | 433758ceb3e11df184a87e8185fbd7f8b969fb79 (patch) | |
| tree | 95d504a01c6a1ba0b1efbe624c7bcecaf2128065 /ext/intl/tests | |
| parent | 4f034016289f5a52073bfd012899dd3e202742b5 (diff) | |
| download | php-git-433758ceb3e11df184a87e8185fbd7f8b969fb79.tar.gz | |
Allow DateTimeImmutable in datefmt_format_object()
As pointed out in a comment on bug #65683.
Diffstat (limited to 'ext/intl/tests')
| -rw-r--r-- | ext/intl/tests/dateformat_bug65683_2.phpt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/intl/tests/dateformat_bug65683_2.phpt b/ext/intl/tests/dateformat_bug65683_2.phpt new file mode 100644 index 0000000000..67d9d7884a --- /dev/null +++ b/ext/intl/tests/dateformat_bug65683_2.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #65683: Intl does not support DateTimeImmutable (using datefmt_format_object) +--FILE-- +<?php +$date = date_create('1970-01-01'); +$date_imm = date_create_immutable('1970-01-01'); +var_dump(datefmt_format_object($date, null, 'fr_FR')); +var_dump(datefmt_format_object($date_imm, null, 'fr_FR')); +?> +--EXPECT-- +string(24) "1 janv. 1970 à 00:00:00" +string(24) "1 janv. 1970 à 00:00:00" |
