fix segfault when initializing a request message with a body
[m6w6/ext-http] / phpunit / CookieTest.php
index affe798dbb647c7bf130a02ffb472635e4ff065e..d569c75f88c02cc464824ce774d1644a7acc8104 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+ini_set("date.timezone", "Europe/Vienna");
+
 class CookieTest extends PHPUnit_Framework_TestCase {
     function testEmpty() {
         $c = new http\Cookie;
@@ -83,7 +85,9 @@ class CookieTest extends PHPUnit_Framework_TestCase {
         $this->assertEquals(
             sprintf(
                 "this=expires; expires=%s; ", 
-                date_create("@$t")->format("D, d M Y H:i:s \\G\\M\\T")
+                date_create("@$t")
+                       ->setTimezone(new DateTimezone("UTC"))
+                       ->format("D, d M Y H:i:s \\G\\M\\T")
             ), 
             $o->toString()
         );