diff --git a/cake/libs/cake_session.php b/cake/libs/cake_session.php index 71a984178..8f75c6947 100644 --- a/cake/libs/cake_session.php +++ b/cake/libs/cake_session.php @@ -1,6 +1,4 @@ delete($name); + } + /** * Removes a variable from session. * @@ -250,7 +256,7 @@ class CakeSession extends Object { * @return boolean Success * @access public */ - function del($name) { + function delete($name) { if ($this->check($name)) { if ($var = $this->__validateKeys($name)) { if (in_array($var, $this->watchKeys)) { diff --git a/cake/libs/controller/components/session.php b/cake/libs/controller/components/session.php index 5d3eb410f..3913fca75 100644 --- a/cake/libs/controller/components/session.php +++ b/cake/libs/controller/components/session.php @@ -183,7 +183,7 @@ class SessionComponent extends CakeSession { function delete($name) { if ($this->__active === true) { $this->__start(); - return parent::del($name); + return parent::delete($name); } return false; } diff --git a/cake/tests/cases/libs/cake_session.test.php b/cake/tests/cases/libs/cake_session.test.php index de5cda82c..76edd87d4 100644 --- a/cake/tests/cases/libs/cake_session.test.php +++ b/cake/tests/cases/libs/cake_session.test.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 * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('CakeSession')) { @@ -190,7 +185,7 @@ class SessionTest extends CakeTestCase { $result = $this->Session->error(); $this->assertEqual($result, "Does.not.exist doesn't exist"); - $this->Session->del('Failing.delete'); + $this->Session->delete('Failing.delete'); $result = $this->Session->error(); $this->assertEqual($result, "Failing.delete doesn't exist"); } @@ -201,14 +196,14 @@ class SessionTest extends CakeTestCase { * @access public * @return void */ - function testDel() { + function testDelete() { $this->assertTrue($this->Session->write('Delete.me', 'Clearing out')); - $this->assertTrue($this->Session->del('Delete.me')); + $this->assertTrue($this->Session->delete('Delete.me')); $this->assertFalse($this->Session->check('Delete.me')); $this->assertTrue($this->Session->check('Delete')); $this->assertTrue($this->Session->write('Clearing.sale', 'everything must go')); - $this->assertTrue($this->Session->del('Clearing')); + $this->assertTrue($this->Session->delete('Clearing')); $this->assertFalse($this->Session->check('Clearing.sale')); $this->assertFalse($this->Session->check('Clearing')); } @@ -228,7 +223,7 @@ class SessionTest extends CakeTestCase { $this->Session->write('Watching', 'They found us!'); $this->expectError('Deleting session key {Watching}'); - $this->Session->del('Watching'); + $this->Session->delete('Watching'); $this->assertFalse($this->Session->watch('Invalid.key')); } @@ -289,7 +284,7 @@ class SessionTest extends CakeTestCase { function testCheckKeyWithSpaces() { $this->assertTrue($this->Session->write('Session Test', "test")); $this->assertEqual($this->Session->check('Session Test'), 'test'); - $this->Session->del('Session Test'); + $this->Session->delete('Session Test'); $this->assertTrue($this->Session->write('Session Test.Test Case', "test")); $this->assertTrue($this->Session->check('Session Test.Test Case'));