xref: /PHP-7.0/ext/curl/tests/bug54995.phpt (revision 41b655d9)
1--TEST--
2Bug #54995 (Missing CURLINFO_RESPONSE_CODE support)
3--SKIPIF--
4<?php
5include 'skipif.inc';
6
7if ($curl_version['version_number'] > 0x070a08) {
8	exit("skip: tests works a versions of curl >= 7.10.8");
9}
10?>
11--FILE--
12<?php
13include 'server.inc';
14$host = curl_cli_server_start();
15$ch = curl_init();
16curl_setopt($ch, CURLOPT_URL, "{$host}/get.php");
17curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
18
19var_dump(curl_getinfo($ch, CURLINFO_HTTP_CODE) == curl_getinfo($ch, CURLINFO_RESPONSE_CODE));
20
21curl_exec($ch);
22curl_close($ch);
23
24?>
25--EXPECTF--
26bool(true)
27