mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding a test case for #1651
This commit is contained in:
parent
9f51c4ccfc
commit
bc5edebee6
1 changed files with 15 additions and 0 deletions
|
@ -450,6 +450,21 @@ class CookieComponentTest extends CakeTestCase {
|
|||
$this->assertNull($this->Controller->Cookie->read('value'));
|
||||
}
|
||||
|
||||
/**
|
||||
* test that deleting a top level keys kills the child elements too.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function testDeleteRemovesChildren() {
|
||||
$_COOKIE['CakeTestCookie'] = array('User' => array('email' => 'example@example.com', 'name' => 'mark'));
|
||||
$this->Controller->Cookie->startup();
|
||||
$this->assertEqual('mark', $this->Controller->Cookie->read('User.name'));
|
||||
|
||||
$this->Controller->Cookie->delete('User');
|
||||
$this->assertFalse($this->Controller->Cookie->read('User.email'));
|
||||
$this->Controller->Cookie->destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* encrypt method
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue