cf99af3b4db3d0c9869bbb01d1279e7df3bed07f
[m6w6/ext-http] / tests / 050_split_response.phpt
1 --TEST--
2 http_split_response()
3 --SKIPIF--
4 <?php
5 extension_loaded('http') or die('ext/http not available');
6 strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
7 ?>
8 --FILE--
9 <?php
10 var_export(http_split_response("HTTP/1.1 200 Ok\r\nContent-Type: text/plain\r\nContent-Language: de-AT\r\nDate: Sat, 22 Jan 2005 18:10:02 GMT\r\n\r\nHallo Du!"));
11 ?>
12 --EXPECTF--
13 Content-type: text/html
14 X-Powered-By: PHP/%s
15
16 array (
17 0 =>
18 array (
19 'Status' => '200 Ok',
20 'Content-Type' => 'text/plain',
21 'Content-Language' => 'de-AT',
22 'Date' => 'Sat, 22 Jan 2005 18:10:02 GMT',
23 ),
24 1 => 'Hallo Du!',
25 )