Skip to content

Commit 7496b54

Browse files
committed
Switched posix test to use curl instead of gd as it is no longer a resource
1 parent a330635 commit 7496b54

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ext/posix/tests/posix_ttyname_error_wrongparams.phpt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Test posix_ttyname() with wrong parameters
33
--DESCRIPTION--
44
Gets the absolute path to the current terminal device that is open on a given file descriptor.
55
Source code: ext/posix/posix.c
6+
67
--CREDITS--
78
Falko Menge, mail at falko-menge dot de
89
PHP Testfest Berlin 2009-05-10
@@ -11,18 +12,16 @@ PHP Testfest Berlin 2009-05-10
1112
if (!extension_loaded('posix')) {
1213
die('SKIP - POSIX extension not available');
1314
}
14-
if (!extension_loaded('gd')) {
15-
die('SKIP - GD extension not available');
16-
}
17-
if (!function_exists('imagecreate')) {
18-
die('SKIP - Function imagecreate() not available');
15+
16+
if (!function_exists('curl_init')) {
17+
die('SKIP - Function curl_init() not available');
1918
}
2019
?>
2120
--FILE--
2221
<?php
2322
var_dump(posix_ttyname(0)); // param not a ressource
2423
try {
25-
var_dump(posix_ttyname(imagecreate(1, 1))); // wrong resource type
24+
var_dump(posix_ttyname(curl_init())); // wrong resource type
2625
} catch (TypeError $e) {
2726
echo $e->getMessage(), "\n";
2827
}

0 commit comments

Comments
 (0)