From c4833ec82bfb58eaf83680a7ee1cc64406ed1b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Pustu=C5=82ka?= Date: Thu, 1 Jun 2017 08:58:48 +0200 Subject: [PATCH] Remove removeCookie() method. --- src/Http/Client.php | 13 ------------- tests/TestCase/Http/ClientTest.php | 19 ------------------- 2 files changed, 32 deletions(-) diff --git a/src/Http/Client.php b/src/Http/Client.php index 020dedbc0c2..cb8fa0d0a1b 100644 --- a/src/Http/Client.php +++ b/src/Http/Client.php @@ -196,19 +196,6 @@ public function addCookie(CookieInterface $cookie) return $this; } - /** - * Removes a cookie from the Client collection. - * - * @param string $name Cookie name. - * @return $this - */ - public function removeCookie($name) - { - $this->_cookies = $this->_cookies->remove($name); - - return $this; - } - /** * Do a GET request. * diff --git a/tests/TestCase/Http/ClientTest.php b/tests/TestCase/Http/ClientTest.php index 6b0fcd7983f..e2d5e135b1c 100644 --- a/tests/TestCase/Http/ClientTest.php +++ b/tests/TestCase/Http/ClientTest.php @@ -653,25 +653,6 @@ public function testAddCookie() $this->assertTrue($client->cookies()->has('foo')); } - /** - * Test removeCookie() method. - * - * @return void - */ - public function testRemoveCookie() - { - $cookie = new Cookie('foo'); - $jar = new CookieCollection([$cookie]); - $client = new Client([ - 'cookieJar' => $jar - ]); - - $this->assertTrue($client->cookies()->has('foo')); - - $client->removeCookie('foo'); - $this->assertFalse($client->cookies()->has('foo')); - } - /** * test head request with querystring data *