summaryrefslogtreecommitdiff
path: root/ext/posix/tests
diff options
context:
space:
mode:
authorMark <mrandall@digitellinc.com>2019-09-27 19:47:24 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-09-30 15:14:02 +0200
commit8aad466c42b5feabc7565856eb006c326f35382f (patch)
tree74f64a61a8c0fda49efb3a3000d53299105e5c2f /ext/posix/tests
parentc0a54f41b3e889de229d9ff7d96c420a7b9abaf6 (diff)
downloadphp-git-8aad466c42b5feabc7565856eb006c326f35382f.tar.gz
Convert GD Resources to objects
Diffstat (limited to 'ext/posix/tests')
-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";
}