Merge branch 'master' of git.php.net:/pecl/http/pecl_http
[m6w6/ext-http] / tests / envresponsecookie001.phpt
diff --git a/tests/envresponsecookie001.phpt b/tests/envresponsecookie001.phpt
new file mode 100644 (file)
index 0000000..c0e93ed
--- /dev/null
@@ -0,0 +1,29 @@
+--TEST--
+env response cookie
+--SKIPIF--
+<?php 
+include "skipif.inc";
+?>
+--FILE--
+<?php 
+
+$r = new http\Env\Response;
+$c = new http\Cookie;
+$c->addCookie("foo","bar");
+$c->setMaxAge(60);
+$r->setCookie($c);
+$r->setCookie("baz");
+$r->setCookie(123);
+$r->send(STDOUT);
+
+?>
+--EXPECT--
+HTTP/1.1 200 OK
+Set-Cookie: foo=bar; max-age=60; 
+Set-Cookie: baz=1; 
+Set-Cookie: 123=1; 
+ETag: ""
+Transfer-Encoding: chunked
+
+0
+