summaryrefslogtreecommitdiff
path: root/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/posix/tests/posix_ttyname_error_wrongparams.phpt')
-rw-r--r--ext/posix/tests/posix_ttyname_error_wrongparams.phpt11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
index 6dcb1d324d..4ff7aaf3fe 100644
--- a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
+++ b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
@@ -3,6 +3,7 @@ Test posix_ttyname() with wrong parameters
--DESCRIPTION--
Gets the absolute path to the current terminal device that is open on a given file descriptor.
Source code: ext/posix/posix.c
+
--CREDITS--
Falko Menge, mail at falko-menge dot de
PHP Testfest Berlin 2009-05-10
@@ -11,18 +12,16 @@ PHP Testfest Berlin 2009-05-10
if (!extension_loaded('posix')) {
die('SKIP - POSIX extension not available');
}
- if (!extension_loaded('gd')) {
- die('SKIP - GD extension not available');
- }
- if (!function_exists('imagecreate')) {
- die('SKIP - Function imagecreate() not available');
+
+ if (!function_exists('curl_init')) {
+ die('SKIP - Function curl_init() not available');
}
?>
--FILE--
<?php
var_dump(posix_ttyname(0)); // param not a ressource
try {
- var_dump(posix_ttyname(imagecreate(1, 1))); // wrong resource type
+ var_dump(posix_ttyname(curl_init())); // wrong resource type
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}