mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Fixing formatting, and updating test to better reflect what would normally happen.
This commit is contained in:
parent
13c64f1707
commit
4395e8acc1
2 changed files with 6 additions and 3 deletions
|
@ -281,8 +281,8 @@ class CookieComponent extends Object {
|
|||
$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 @@ class CookieComponentTest extends CakeTestCase {
|
|||
* @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'));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue