let DEV_2 be trunk
[m6w6/ext-http] / tests / envresponsebody002.phpt
diff --git a/tests/envresponsebody002.phpt b/tests/envresponsebody002.phpt
new file mode 100644 (file)
index 0000000..1421b09
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+env response body error
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--INI--
+output_buffering=1
+--FILE--
+<?php
+echo "Test\n";
+ob_flush();
+try {
+       $r = new http\Env\Response;
+       var_dump((string) $r->getBody());
+} catch (http\Exception $e) {
+       echo $e->getMessage(),"\n";
+}
+?>
+Done
+--EXPECTF--
+Test
+http\Env\Response::__construct(): Could not fetch response body, output has already been sent at %senvresponsebody002.php:3
+Done