From 9afa4d1c3acb0d4cc5c1cd3c74396227d5cf0bb1 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 31 Aug 2009 22:52:15 -0400 Subject: [PATCH] Updating test case to reflect API changes. --- cake/libs/controller/components/cookie.php | 9 ++------ .../controller/components/cookie.test.php | 23 ++++++++----------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/cake/libs/controller/components/cookie.php b/cake/libs/controller/components/cookie.php index 716511532..4d147026d 100644 --- a/cake/libs/controller/components/cookie.php +++ b/cake/libs/controller/components/cookie.php @@ -1,6 +1,4 @@ - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components * @since CakePHP(tm) v 1.2.0.5435 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Controller', array('Component', 'Controller'), false); @@ -182,9 +177,9 @@ class CookieComponentTest extends CakeTestCase { $this->assertEqual($this->Controller->Cookie->read('version'), '1.2.0.x'); $this->assertEqual($this->Controller->Cookie->read('tag'), 'CakePHP Rocks!'); - $this->Controller->Cookie->del('name'); - $this->Controller->Cookie->del('version'); - $this->Controller->Cookie->del('tag'); + $this->Controller->Cookie->delete('name'); + $this->Controller->Cookie->delete('version'); + $this->Controller->Cookie->delete('tag'); } /** @@ -222,22 +217,22 @@ class CookieComponentTest extends CakeTestCase { * @return void */ function testDeleteCookieValue() { - $this->Controller->Cookie->del('Encrytped_multi_cookies.name'); + $this->Controller->Cookie->delete('Encrytped_multi_cookies.name'); $data = $this->Controller->Cookie->read('Encrytped_multi_cookies'); $expected = array('version' => '1.2.0.x', 'tag' =>'CakePHP Rocks!'); $this->assertEqual($data, $expected); - $this->Controller->Cookie->del('Encrytped_array'); + $this->Controller->Cookie->delete('Encrytped_array'); $data = $this->Controller->Cookie->read('Encrytped_array'); $expected = array(); $this->assertEqual($data, $expected); - $this->Controller->Cookie->del('Plain_multi_cookies.name'); + $this->Controller->Cookie->delete('Plain_multi_cookies.name'); $data = $this->Controller->Cookie->read('Plain_multi_cookies'); $expected = array('version' => '1.2.0.x', 'tag' =>'CakePHP Rocks!'); $this->assertEqual($data, $expected); - $this->Controller->Cookie->del('Plain_array'); + $this->Controller->Cookie->delete('Plain_array'); $data = $this->Controller->Cookie->read('Plain_array'); $expected = array(); $this->assertEqual($data, $expected);