unfold cookie tests and fix variable type inconsitency
[m6w6/ext-http] / tests / cookie001.phpt
diff --git a/tests/cookie001.phpt b/tests/cookie001.phpt
new file mode 100644 (file)
index 0000000..3adf8d7
--- /dev/null
@@ -0,0 +1,31 @@
+--TEST--
+cookies empty state
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+$c = new http\Cookie;
+$o = clone $c;
+$a = array(
+       "cookies" => array(),
+       "extras" => array(),
+       "flags" => 0,
+       "expires" => -1,
+       "path" => "",
+       "domain" => "",
+       "max-age" => -1,
+);
+var_dump($a == $c->toArray());
+var_dump($a == $o->toArray());
+
+?>
+DONE
+--EXPECT--
+Test
+bool(true)
+bool(true)
+DONE