Skip to content

Commit

Permalink
Rename Cookies class to CookieCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrowe committed Jul 22, 2014
1 parent 2959a17 commit 0f7e7ea
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/Network/Http/Client.php
Expand Up @@ -16,7 +16,7 @@
use Cake\Core\App;
use Cake\Core\InstanceConfigTrait;
use Cake\Error;
use Cake\Network\Http\Cookies;
use Cake\Network\Http\CookieCollection;
use Cake\Network\Http\Request;
use Cake\Utility\Hash;

Expand Down Expand Up @@ -50,7 +50,7 @@
*
* You can use the 'cookieJar' constructor option to provide a custom
* cookie jar instance you've restored from cache/disk. By default
* an empty instance of Cake\Network\Http\Cookies will be created.
* an empty instance of Cake\Network\Http\CookieCollection will be created.
*
* ### Sending request bodies
*
Expand Down Expand Up @@ -112,7 +112,7 @@ class Client {
* Cookies are indexed by the cookie's domain or
* request host name.
*
* @var \Cake\Network\Http\Cookies
* @var \Cake\Network\Http\CookieCollection
*/
protected $_cookies;

Expand Down Expand Up @@ -159,7 +159,7 @@ public function __construct($config = []) {
$this->_cookies = $this->_config['cookieJar'];
$this->config('cookieJar', null);
} else {
$this->_cookies = new Cookies();
$this->_cookies = new CookieCollection();
}
}

Expand All @@ -168,7 +168,7 @@ public function __construct($config = []) {
*
* Returns an array of cookie data arrays.
*
* @return \Cake\Network\Http\Cookies
* @return \Cake\Network\Http\CookieCollection
*/
public function cookies() {
return $this->_cookies;
Expand Down
Expand Up @@ -21,7 +21,7 @@
* Provides cookie jar like features for storing cookies between
* requests, as well as appending cookies to new requests.
*/
class Cookies {
class CookieCollection {

/**
* The cookies stored in this jar.
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Network/Http/ClientTest.php
Expand Up @@ -413,7 +413,7 @@ public function testCookieStorage() {
'Cake\Network\Http\Adapter\Stream',
['send']
);
$cookieJar = $this->getMock('Cake\Network\Http\Cookies');
$cookieJar = $this->getMock('Cake\Network\Http\CookieCollection');

$headers = [
'HTTP/1.0 200 Ok',
Expand Down
Expand Up @@ -13,14 +13,14 @@
*/
namespace Cake\Test\TestCase\Network\Http;

use Cake\Network\Http\Cookies;
use Cake\Network\Http\CookieCollection;
use Cake\Network\Http\Response;
use Cake\TestSuite\TestCase;

/**
* HTTP cookies test.
*/
class CookiesTest extends TestCase {
class CookieCollectionTest extends TestCase {

/**
* setup
Expand All @@ -29,7 +29,7 @@ class CookiesTest extends TestCase {
*/
public function setUp() {
parent::setUp();
$this->cookies = new Cookies();
$this->cookies = new CookieCollection();
}

/**
Expand Down

0 comments on commit 0f7e7ea

Please sign in to comment.