unfold cookie tests and fix variable type inconsitency
[m6w6/ext-http] / tests / cookie002.phpt
diff --git a/tests/cookie002.phpt b/tests/cookie002.phpt
new file mode 100644 (file)
index 0000000..98c883b
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+cookies expire as date
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--INI--
+date.timezone=UTC
+--FILE--
+<?php
+echo "Test\n";
+
+$d = new DateTime;
+$c = new http\Cookie(array("expires" => $d->format(DateTime::RFC1123)));
+var_dump($d->format("U") == $c->getExpires());
+
+?>
+DONE
+--EXPECT--
+Test
+bool(true)
+DONE