Permalink
Browse files

Fixing formatting, and updating test to better reflect what would nor…

…mally happen.
  • Loading branch information...
1 parent 13c64f1 commit 4395e8acc10634c573b7ef507d71fb2e32967bc8 @markstory markstory committed Apr 16, 2011
@@ -281,8 +281,8 @@ function delete($key) {
$this->read();
}
if (strpos($key, '.') === false) {
- if(isset($this->__values[$key]) && is_array($this->__values[$key])) {
- foreach($this->__values[$key] as $idx => $val) {
+ if (isset($this->__values[$key]) && is_array($this->__values[$key])) {
+ foreach ($this->__values[$key] as $idx => $val) {
$this->__delete("[$key][$idx]");
}
} else {
@@ -456,7 +456,10 @@ function testNoErrorOnNonArrayData() {
* @return void
*/
function testDeleteRemovesChildren() {
- $_COOKIE['CakeTestCookie'] = array('User' => array('email' => 'example@example.com', 'name' => 'mark'));
+ $_COOKIE['CakeTestCookie'] = array(
+ 'User' => array('email' => 'example@example.com', 'name' => 'mark'),
+ 'other' => 'value'
+ );
$this->Controller->Cookie->startup();
$this->assertEqual('mark', $this->Controller->Cookie->read('User.name'));

0 comments on commit 4395e8a

Please sign in to comment.