tests: resource
authorMichael Wallner <mike@php.net>
Fri, 7 Jan 2022 20:06:50 +0000 (21:06 +0100)
committerMichael Wallner <mike@php.net>
Fri, 7 Jan 2022 20:06:50 +0000 (21:06 +0100)
tests/serialize/resource.phpt [new file with mode: 0644]

diff --git a/tests/serialize/resource.phpt b/tests/serialize/resource.phpt
new file mode 100644 (file)
index 0000000..437f884
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+ion\serialize/resource
+--EXTENSIONS--
+ion
+--FILE--
+TEST
+<?php
+try {
+       ion\serialize(STDOUT);
+} catch (Throwable $e) {
+       printf("caught %s: %s\n", get_class($e), $e->getMessage());
+}
+?>
+DONE
+--EXPECTF--
+TEST
+caught InvalidArgumentException: Failed to serialize value of type resource
+DONE