let DEV_2 be trunk
[m6w6/ext-http] / tests / envresponse006.phpt
diff --git a/tests/envresponse006.phpt b/tests/envresponse006.phpt
new file mode 100644 (file)
index 0000000..76141c1
--- /dev/null
@@ -0,0 +1,31 @@
+--TEST--
+env response stream
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+$f = tmpfile();
+
+$r = new http\Env\Response;
+$r->addHeader("foo", array("bar","baz"));
+$r->getBody()->append("foo");
+
+$r->send($f);
+
+rewind($f);
+var_dump(stream_get_contents($f));
+?>
+Done
+--EXPECT--
+Test
+string(77) "HTTP/1.1 200 OK
+Accept-Ranges: bytes
+Foo: bar, baz
+ETag: "8c736521"
+
+foo"
+Done