mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding test for CookieComponent::write() and writing an array of unencrypted key/value pairs, disproves #4997
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7289 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
06869fd4b3
commit
7bad69a2d0
1 changed files with 12 additions and 0 deletions
|
@ -95,6 +95,18 @@ class CookieComponentTest extends CakeTestCase {
|
|||
$this->assertEqual($data, $expected);
|
||||
}
|
||||
|
||||
function testWritePlainCookieArray() {
|
||||
$this->Controller->Cookie->write(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!'), false);
|
||||
|
||||
$this->assertEqual($this->Controller->Cookie->read('name'), 'CakePHP');
|
||||
$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');
|
||||
}
|
||||
|
||||
function testReadingCookieValue() {
|
||||
$data = $this->Controller->Cookie->read();
|
||||
$expected = array(
|
||||
|
|
Loading…
Reference in a new issue