1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00
Files
archived-php-src/ext/curl/tests/curl_share_setopt_basic001.phpt
T
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00

27 lines
545 B
PHP

--TEST--
curl_share_setopt basic test
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--FILE--
<?php
$sh = curl_share_init();
var_dump(curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE));
var_dump(curl_share_setopt($sh, CURLSHOPT_UNSHARE, CURL_LOCK_DATA_DNS));
try {
curl_share_setopt($sh, -1, 0);
} catch (ValueError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
bool(true)
bool(true)
curl_share_setopt(): Argument #2 ($option) is not a valid cURL share option