fix test
authorMichael Wallner <mike@php.net>
Fri, 17 Jan 2014 15:37:46 +0000 (16:37 +0100)
committerMichael Wallner <mike@php.net>
Fri, 17 Jan 2014 15:37:46 +0000 (16:37 +0100)
tests/params001.phpt

index 1fec867..f696249 100644 (file)
@@ -8,7 +8,7 @@ include "skipif.inc";
 <?php
 echo "Test\n";
 
-$ct = new http\Params("text/html; charset=utf-8");
+$ct = new http\Params("text/html; charset=utf-8", ",", ";", "=", 0);
 
 var_dump(
        isset($ct["text/html"]),
@@ -26,7 +26,7 @@ var_dump(
        $ct["text/json"]["arguments"]["charset"]
 );
 
-var_dump((string) $ct);
+var_dump((string) $ct,$ct);
 
 echo "Done\n";
 --EXPECTF--
@@ -38,4 +38,27 @@ bool(false)
 bool(true)
 string(10) "iso-8859-1"
 string(%d) "text/json;charset=iso-8859-1"
+object(http\Params)#%d (5) {
+  ["params"]=>
+  array(1) {
+    ["text/json"]=>
+    array(2) {
+      ["value"]=>
+      bool(true)
+      ["arguments"]=>
+      array(1) {
+        ["charset"]=>
+        string(10) "iso-8859-1"
+      }
+    }
+  }
+  ["param_sep"]=>
+  string(1) ","
+  ["arg_sep"]=>
+  string(1) ";"
+  ["val_sep"]=>
+  string(1) "="
+  ["flags"]=>
+  int(0)
+}
 Done