Skip to content

Commit

Permalink
Adding test for #GH424
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 20, 2012
1 parent ad304e0 commit 1693478
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php
Expand Up @@ -909,6 +909,30 @@ public function testValidateHasManyRecordsPass() {
$this->assertTrue($result);
}

/**
* Test that values like Foo.0.1
*
* @return void
*/
public function testValidateNestedNumericSets() {

$this->Controller->Security->startup($this->Controller);
$key = $this->Controller->request->params['_Token']['key'];
$unlocked = '';
$hashFields = array('TaxonomyData');
$fields = urlencode(Security::hash(serialize($hashFields) . $unlocked . Configure::read('Security.salt')));

$this->Controller->request->data = array(
'TaxonomyData' => array(
1 => array(array(2)),
2 => array(array(3))
),
'_Token' => compact('key', 'fields', 'unlocked')
);
$result = $this->Controller->Security->validatePost($this->Controller);
$this->assertTrue($result);
}

/**
* testValidateHasManyRecords method
*
Expand Down

0 comments on commit 1693478

Please sign in to comment.