- 4 etag tests using ob
authorMichael Wallner <mike@php.net>
Fri, 7 Oct 2005 10:57:08 +0000 (10:57 +0000)
committerMichael Wallner <mike@php.net>
Fri, 7 Oct 2005 10:57:08 +0000 (10:57 +0000)
tests/etag_mode_011.phpt [new file with mode: 0644]
tests/etag_mode_012.phpt [new file with mode: 0644]
tests/etag_mode_013.phpt [new file with mode: 0644]
tests/etag_mode_014.phpt [new file with mode: 0644]

diff --git a/tests/etag_mode_011.phpt b/tests/etag_mode_011.phpt
new file mode 100644 (file)
index 0000000..75505aa
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+ob crc32 etag
+--SKIPIF--
+<?php
+include 'skip.inc';
+checkcgi();
+?>
+--FILE--
+<?php
+ini_set('http.etag_mode', HTTP_ETAG_CRC32);
+http_cache_etag();
+print("abc\n");
+?>
+--EXPECTF--
+Content-type: %s
+X-Powered-By: PHP/%s
+Cache-Control: private, must-revalidate, max-age=0
+ETag: "28ad514e"
+
+abc
diff --git a/tests/etag_mode_012.phpt b/tests/etag_mode_012.phpt
new file mode 100644 (file)
index 0000000..235225d
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+ob sha1 etag
+--SKIPIF--
+<?php
+include 'skip.inc';
+checkcgi();
+?>
+--FILE--
+<?php
+ini_set('http.etag_mode', HTTP_ETAG_SHA1);
+http_cache_etag();
+print("abc\n");
+?>
+--EXPECTF--
+Content-type: %s
+X-Powered-By: PHP/%s
+Cache-Control: private, must-revalidate, max-age=0
+ETag: "03cfd743661f07975fa2f1220c5194cbaff48451"
+
+abc
diff --git a/tests/etag_mode_013.phpt b/tests/etag_mode_013.phpt
new file mode 100644 (file)
index 0000000..4100173
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+ob md5 etag
+--SKIPIF--
+<?php
+include 'skip.inc';
+checkcgi();
+?>
+--FILE--
+<?php
+ini_set('http.etag_mode', HTTP_ETAG_MD5);
+http_cache_etag();
+print("abc\n");
+?>
+--EXPECTF--
+Content-type: %s
+X-Powered-By: PHP/%s
+Cache-Control: private, must-revalidate, max-age=0
+ETag: "0bee89b07a248e27c83fc3d5951213c1"
+
+abc
diff --git a/tests/etag_mode_014.phpt b/tests/etag_mode_014.phpt
new file mode 100644 (file)
index 0000000..bd4df95
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+ob mhash etag
+--SKIPIF--
+<?php
+include 'skip.inc';
+checkcgi();
+?>
+--FILE--
+<?php
+ini_set('http.etag_mode', HTTP_ETAG_MHASH_WHIRLPOOL);
+http_cache_etag();
+print("abc\n");
+?>
+--EXPECTF--
+Content-type: %s
+X-Powered-By: PHP/%s
+Cache-Control: private, must-revalidate, max-age=0
+ETag: "53efa9e423f86dabd449b3e23dd0350def661b9e7055b23ceb2230c8b61bc0766514957ea9d349a88ef794715a1a17a409b549edfd6f43d696e63407fff3541c"
+
+abc