Skip to content

Commit 9aa1522

Browse files
committed
add test for #137
1 parent 7639a2c commit 9aa1522

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/issue137.phpt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--TEST--
2+
Issue #137 (DateTime(Immutable) serialization doesn't work with php 7.4)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded("msgpack")) {
6+
echo "skip";
7+
}
8+
--FILE--
9+
<?php
10+
var_dump(msgpack_unpack(msgpack_pack(new DatetimeImmutable)));
11+
?>
12+
OK
13+
--EXPECTF--
14+
object(DateTimeImmutable)#%d (3) {
15+
["date"]=>
16+
string(26) "%d-%d-%d %d:%d:%f"
17+
["timezone_type"]=>
18+
int(%d)
19+
["timezone"]=>
20+
string(%d) "%s"
21+
}
22+
OK

0 commit comments

Comments
 (0)