summaryrefslogtreecommitdiff
path: root/ext/sockets/tests/socket_select_error.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sockets/tests/socket_select_error.phpt')
-rw-r--r--ext/sockets/tests/socket_select_error.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/sockets/tests/socket_select_error.phpt b/ext/sockets/tests/socket_select_error.phpt
new file mode 100644
index 0000000000..48acb33020
--- /dev/null
+++ b/ext/sockets/tests/socket_select_error.phpt
@@ -0,0 +1,17 @@
+--TEST--
+socket_select() error conditions
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) die('skip socket extension not available');
+?>
+--FILE--
+<?php
+$r = $w = $e = ['no resource'];
+try {
+ socket_select($r, $w, $e, 1);
+} catch (TypeError $ex) {
+ echo $ex->getMessage(), PHP_EOL;
+}
+?>
+--EXPECT--
+socket_select(): supplied argument is not a valid Socket resource