1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Files
archived-php-src/ext/curl/tests/curl_multi_close_basic001.phpt
T
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

26 lines
621 B
PHP

--TEST--
curl_multi_close return false when suplied resorce not valid cURL multi handle
--SKIPIF--
<?php
if (!extension_loaded('curl')) print 'skip';
?>
--FILE--
<?php
$cmh = curl_multi_init();
var_dump($cmh);
$multi_close_result = curl_multi_close($cmh);
var_dump($multi_close_result);
var_dump($cmh);
try {
$bad_mh_close_result = curl_multi_close($cmh);
var_dump($bad_mh_close_result);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECTF--
resource(%d) of type (curl_multi)
NULL
resource(%d) of type (Unknown)
curl_multi_close(): supplied resource is not a valid cURL Multi Handle resource