- add response tests
[m6w6/ext-http] / tests / HttpResponse_002.phpt
diff --git a/tests/HttpResponse_002.phpt b/tests/HttpResponse_002.phpt
new file mode 100644 (file)
index 0000000..6f097b1
--- /dev/null
@@ -0,0 +1,25 @@
+--TEST--
+HttpResponse - send gzipped file
+--SKIPIF--
+<?php 
+include 'skip.inc';
+checkver(5);
+checkcgi();
+checkext('zlib');
+?>
+--ENV--
+HTTP_ACCEPT_ENCODING=gzip
+--FILE--
+<?php
+HttpResponse::setGzip(true);
+HttpResponse::setFile(__FILE__);
+HttpResponse::send();
+?>
+--EXPECTF--
+X-Powered-By: PHP/%s
+Content-Type: %s
+Accept-Ranges: bytes
+Content-Encoding: gzip
+Vary: Accept-Encoding
+
+%s
\ No newline at end of file