let DEV_2 be trunk
[m6w6/ext-http] / tests / envresponse004.phpt
diff --git a/tests/envresponse004.phpt b/tests/envresponse004.phpt
new file mode 100644 (file)
index 0000000..f84c860
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+env reponse callback
+--SKIPIF--
+<?php
+include "skipif.inc";
+if (version_compare(PHP_VERSION, "5.4.0", "<")) die("SKIP 5.3 ob is broken");
+?>
+--GET--
+dummy=1
+--FILE--
+<?php
+
+$r = new http\Env\Response;
+$r->setCacheControl("public,must-revalidate,max-age=0");
+$r->setThrottleRate(1, 0.1);
+ob_start($r);
+
+echo "foo";
+echo "bar";
+
+ob_end_flush();
+$r->send();
+--EXPECTHEADERS--
+Accept-Ranges: bytes
+Cache-Control: public,must-revalidate,max-age=0
+ETag: "9ef61f95"
+--EXPECTF--
+foobar