- tests fixup
[m6w6/ext-http] / tests / etag_mode_crc.phpt
1 --TEST--
2 sane crc etags
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 chkver(5.1);
7 ?>
8 --FILE--
9 <?php
10 echo "-TEST\n";
11
12 ini_set('http.etag_mode', HTTP_ETAG_CRC32);
13 HttpResponse::setData("abc");
14 $php = HttpResponse::getEtag();
15
16 ini_set('http.etag_mode', HTTP_ETAG_MHASH_CRC32);
17 HttpResponse::setData("abc");
18 $crc = HttpResponse::getEtag();
19
20 ini_set('http.etag_mode', HTTP_ETAG_MHASH_CRC32B);
21 HttpResponse::setData("abc");
22 $equ = HttpResponse::getEtag();
23
24 echo $php,"\n", $equ,"\n", $crc,"\n";
25
26 var_dump($equ === $php);
27 var_dump($equ !== $crc);
28
29 echo "Done\n";
30 --EXPECTF--
31 %sTEST
32 c2412435
33 c2412435
34 73bb8c64
35 bool(true)
36 bool(true)
37 Done