fix #91: get rid of most of the yearly failing test
[m6w6/ext-http] / tests / encstream007.phpt
1 --TEST--
2 encoding stream zlib without flush
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 $defl = new http\Encoding\Stream\Deflate;
12 $infl = new http\Encoding\Stream\Inflate;
13 $file = file(__FILE__);
14 $data = "";
15 foreach ($file as $line) {
16 $infl = clone $infl;
17 $defl = clone $defl;
18 if (strlen($temp = $defl->update($line))) {
19 foreach(str_split($temp) as $byte) {
20 $data .= $infl->update($byte);
21 }
22 }
23 }
24 if (strlen($temp = $defl->finish())) {
25 $data .= $infl->update($temp);
26 }
27 $data .= $infl->finish();
28 var_dump(implode("", $file) === $data);
29 ?>
30 DONE
31 --EXPECT--
32 Test
33 bool(true)
34 DONE