Skip to content

Commit 87e0424

Browse files
committed
tests: do not depend on ext/curl for a simple resource
1 parent 7736836 commit 87e0424

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

tests/023.phpt

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,10 @@ function test($type, $variable, $test) {
1919
echo $test || $unserialized === null ? 'OK' : 'FAIL', PHP_EOL;
2020
}
2121

22-
if (function_exists('curl_init')) {
23-
$test = 'curl';
24-
$res = curl_init('http://php.net/');
25-
} else {
26-
$test = 'dir';
27-
$res = opendir('/tmp');
28-
}
29-
22+
$res = opendir('/tmp');
3023
test('resource', $res, false);
24+
closedir($res);
3125

32-
switch ($test) {
33-
case 'curl':
34-
curl_close($res);
35-
break;
36-
default:
37-
closedir($res);
38-
break;
39-
}
4026
?>
4127
--EXPECT--
4228
resource

0 commit comments

Comments
 (0)