- extend & fixup test suite
[m6w6/ext-http] / tests / HttpMessage_002.phpt
diff --git a/tests/HttpMessage_002.phpt b/tests/HttpMessage_002.phpt
new file mode 100644 (file)
index 0000000..d1fd173
--- /dev/null
@@ -0,0 +1,32 @@
+--TEST--
+HttpMessage properties
+--SKIPIF--
+<?php
+include 'skip.inc';
+checkmin(5);
+checkcls('HttpMessage');
+?>
+--FILE--
+<?php
+class Message extends HttpMessage
+{
+       public function test()
+       {
+               print_r($this->headers);
+               $this->headers['Foo'] = 'Bar';
+       }
+}
+
+error_reporting(E_ALL|E_STRICT);
+
+echo "-TEST\n";
+$m = new Message;
+$m->test();
+echo "Done\n";
+?>
+--EXPECTF--
+%sTEST
+Array
+(
+)
+%sFatal error%sCannot access HttpMessage properties by reference or array key/index in%s