mirror of
https://github.com/php/php-src.git
synced 2026-04-14 11:32:11 +02:00
Current run-tests.php script produces the `*.php` files from the *.phpt. So all *.php files in tests folders are ignored by Git. To avoid confusion and to for bettere consistency this patch renames two remaining tests/*/*.php files to *.inc and *.phar as current practice in *.phpt files. - The `ext/curl/tests/resonder/get.php` to .inc extension - The `ext/phar/tests/files/pear2coverage.phar.php` to .phar extension
32 lines
714 B
PHP
32 lines
714 B
PHP
--TEST--
|
|
Test curl_getinfo() function with CURLINFO_HTTP_VERSION parameter
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("curl")) print "skip";
|
|
$curl_version = curl_version();
|
|
if ($curl_version['version_number'] < 0x073200) {
|
|
exit("skip: test works only with curl >= 7.50.0");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
include 'server.inc';
|
|
|
|
$ch = curl_init();
|
|
var_dump(0 === curl_getinfo($ch, CURLINFO_HTTP_VERSION));
|
|
|
|
$host = curl_cli_server_start();
|
|
|
|
$url = "{$host}/get.inc?test=";
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
curl_exec($ch);
|
|
var_dump(CURL_HTTP_VERSION_1_1 === curl_getinfo($ch, CURLINFO_HTTP_VERSION));
|
|
curl_close($ch);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
===DONE===
|