Skip to content

Commit

Permalink
Remove removeCookie() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Pustułka committed Jun 1, 2017
1 parent 342d624 commit c4833ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
13 changes: 0 additions & 13 deletions src/Http/Client.php
Expand Up @@ -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.
*
Expand Down
19 changes: 0 additions & 19 deletions tests/TestCase/Http/ClientTest.php
Expand Up @@ -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
*
Expand Down

0 comments on commit c4833ec

Please sign in to comment.