From 9a161432e4789f0947d9e75c7447dd806824a405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=A2=D0=B0=D0=BB=D0=B0=D0=BD?= =?UTF-8?q?=D1=86=D0=B5=D0=B2?= Date: Fri, 28 Aug 2015 14:19:48 +0500 Subject: [PATCH 1/2] + fails test --- tests/Cookie/CookieJarTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Cookie/CookieJarTest.php b/tests/Cookie/CookieJarTest.php index 243d9cac..69108599 100644 --- a/tests/Cookie/CookieJarTest.php +++ b/tests/Cookie/CookieJarTest.php @@ -32,6 +32,8 @@ class CookieJarTest extends \PHPUnit_Framework_TestCase { $this->assertEquals('foo', CookieJar::getCookieValue('foo')); $this->assertEquals('"foo,bar"', CookieJar::getCookieValue('foo,bar')); + $this->assertEquals('"foobar="', CookieJar::getCookieValue('foobar=')); + $this->assertEquals('"foo;bar"', CookieJar::getCookieValue('foo;bar')); } public function testCreatesFromArray() From fe012ca157420627daaf1acdfddcd562afacf632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=A2=D0=B0=D0=BB=D0=B0=D0=BD?= =?UTF-8?q?=D1=86=D0=B5=D0=B2?= Date: Fri, 28 Aug 2015 14:31:21 +0500 Subject: [PATCH 2/2] + Fix incorrect equal char while get cookie (fix fails test) --- src/Cookie/CookieJar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cookie/CookieJar.php b/src/Cookie/CookieJar.php index aac527d9..6d090dbf 100644 --- a/src/Cookie/CookieJar.php +++ b/src/Cookie/CookieJar.php @@ -69,7 +69,7 @@ class CookieJar implements CookieJarInterface { if (substr($value, 0, 1) !== '"' && substr($value, -1, 1) !== '"' && - strpbrk($value, ';,') + strpbrk($value, ';,=') ) { $value = '"' . $value . '"'; }