Possible null pointer dereference in php_http_url_mod() fixed.
[m6w6/ext-http] / tests / messagebody001.phpt
1 --TEST--
2 message body stat
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 $file = new http\Message\Body(fopen(__FILE__, "r"));
12 $temp = new http\Message\Body();
13 var_dump(filesize(__FILE__) === $file->stat("size"));
14 var_dump(filemtime(__FILE__) === $file->stat("mtime"));
15 var_dump(fileatime(__FILE__) === $file->stat("atime"));
16 var_dump(filectime(__FILE__) === $file->stat("ctime"));
17 var_dump(
18 (object) array(
19 "size" => 0,
20 "mtime" => 0,
21 "atime" => 0,
22 "ctime" => 0,
23 ) == $temp->stat()
24 );
25 ?>
26 DONE
27 --EXPECT--
28 Test
29 bool(true)
30 bool(true)
31 bool(true)
32 bool(true)
33 bool(true)
34 DONE