travis: allow_failures
[m6w6/ext-http] / tests / envresponse009.phpt
1 --TEST--
2 env response stream cache negative
3 --SKIPIF--
4 <?php include "skipif.inc"; ?>
5 --GET--
6 a=b
7 --ENV--
8 HTTP_IF_MODIFIED_SINCE=Fri, 13 Feb 2009 23:31:30 GMT
9 HTTP_IF_NONE_MATCH=0000-00-0000
10 --FILE--
11 <?php
12 $f = tmpfile();
13 $r = new http\Env\Response;
14 $r->setBody(new http\Message\Body(fopen(__FILE__,"rb")));
15 $r->setEtag("abc");
16 $r->setLastModified(1234567891);
17 $r->send($f);
18 rewind($f);
19 var_dump(stream_get_contents($f));
20 ?>
21 --EXPECTF--
22 string(%d) "HTTP/1.1 200 OK%c
23 Accept-Ranges: bytes%c
24 X-Powered-By: %s%c
25 ETag: "abc"%c
26 Last-Modified: %s%c
27 Transfer-Encoding: chunked%c
28 %c
29 e1%c
30 <?php
31 $f = tmpfile();
32 $r = new http\Env\Response;
33 $r->setBody(new http\Message\Body(fopen(__FILE__,"rb")));
34 $r->setEtag("abc");
35 $r->setLastModified(1234567891);
36 $r->send($f);
37 rewind($f);
38 var_dump(stream_get_contents($f));
39 ?>
40 %c
41 0%c
42 %c
43 "
44