Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding a test case for #1651

  • Loading branch information...
commit bc5edebee6ec679152d8c03eca373c9e853c4ca1 1 parent 9f51c4c
@markstory markstory authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 cake/tests/cases/libs/controller/components/cookie.test.php
View
15 cake/tests/cases/libs/controller/components/cookie.test.php
@@ -451,6 +451,21 @@ function testNoErrorOnNonArrayData() {
}
/**
+ * 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
*
* @param mixed $value
Please sign in to comment.
Something went wrong with that request. Please try again.