Adding test for #GH424

This commit is contained in:
mark_story 2012-01-19 21:49:59 -05:00
parent ad304e0b43
commit 1693478889

View file

@ -909,6 +909,30 @@ class SecurityComponentTest extends CakeTestCase {
$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
*