mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Updating test case to reflect API changes.
This commit is contained in:
parent
4ee70c01a8
commit
9afa4d1c3a
2 changed files with 11 additions and 21 deletions
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
|
||||
/**
|
||||
* Short description for file.
|
||||
*
|
||||
|
@ -9,20 +7,17 @@
|
|||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
|
||||
* 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 MIT 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 http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
||||
* @package cake
|
||||
* @subpackage cake.cake.libs.controller.components
|
||||
* @since CakePHP(tm) v 1.2.0.4213
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
/* SVN FILE: $Id$ */
|
||||
|
||||
/**
|
||||
* CookieComponentTest file
|
||||
*
|
||||
|
@ -9,20 +7,17 @@
|
|||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
||||
* 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);
|
||||
|
|
Loading…
Reference in a new issue