Skip to content

Commit

Permalink
phpcs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Krämer committed Feb 17, 2017
1 parent 5677230 commit a1e2fdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/Http/Cookie/RequestCookies.php
Expand Up @@ -23,6 +23,7 @@ class RequestCookies extends CookieCollection
* Create instance from a server request.
*
* @param \Psr\Http\Message\ServerRequestInterface $request Request object
* @param string $cookieClass Cookie class to use for the cookies
* @return \Cake\Http\Client\RequestCookies
*/
public static function createFromRequest(ServerRequestInterface $request, $cookieClass = Cookie::class)
Expand Down
12 changes: 3 additions & 9 deletions tests/TestCase/Http/Cookie/CookieTest.php
Expand Up @@ -52,13 +52,8 @@ public function testValidateNameEmptyName()
*/
public function testDecrypt()
{
$encryptedCookieValue = 'Q2FrZQ==.N2Y1ODQ3ZDAzYzQzY2NkYTBlYTkwMmRkZjFmN'
. 'GI3Mjk4ZWY5ZmExYTA4YmM2ZThjOWFhZWY1Njc4ZDZlMjE4Y/fhI6zv+siabYg0Cnm2j'
. '2P51Sghk7WsVxZr94g5fhmkLJ4ve7j54v9r5/vHSIHtog==';

$expected = 'Q2FrZQ==.N2Y1ODQ3ZDAzYzQzY2NkYTBlYTkwMmRkZjFmNGI3Mjk4ZWY5Z'
. 'mExYTA4YmM2ZThjOWFhZWY1Njc4ZDZlMjE4Y/fhI6zv+siabYg0Cnm2j2P51Sghk7WsV'
. 'xZr94g5fhmkLJ4ve7j54v9r5/vHSIHtog==';
$encryptedCookieValue = 'Q2FrZQ==.N2Y1ODQ3ZDAzYzQzY2NkYTBlYTkwMmRkZjFmNGI3Mjk4ZWY5ZmExYTA4YmM2ZThjOWFhZWY1Njc4ZDZlMjE4Y/fhI6zv+siabYg0Cnm2j2P51Sghk7WsVxZr94g5fhmkLJ4ve7j54v9r5/vHSIHtog==';
$expected = 'Q2FrZQ==.N2Y1ODQ3ZDAzYzQzY2NkYTBlYTkwMmRkZjFmNGI3Mjk4ZWY5ZmExYTA4YmM2ZThjOWFhZWY1Njc4ZDZlMjE4Y/fhI6zv+siabYg0Cnm2j2P51Sghk7WsVxZr94g5fhmkLJ4ve7j54v9r5/vHSIHtog==';

$cookie = new Cookie('cakephp', $encryptedCookieValue);
$this->assertEquals($expected, $cookie->getValue());
Expand Down Expand Up @@ -99,8 +94,7 @@ public function testToHeaderValue()
$cookie->expiresAt($date);
$result = $cookie->toHeaderValue();

$expected = 'cakephp=cakephp-rocks; expires=Wed, 01-Dec-2049 12:00:00 '
. 'GMT; domain=cakephp.org';
$expected = 'cakephp=cakephp-rocks; expires=Wed, 01-Dec-2049 12:00:00 GMT; domain=cakephp.org';

$this->assertEquals($expected, $result);
}
Expand Down

0 comments on commit a1e2fdc

Please sign in to comment.