mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 03:52:41 +00:00
parent
88f5a7ad0f
commit
5d830d7adb
2 changed files with 20 additions and 1 deletions
|
@ -4255,6 +4255,23 @@ class FormHelperTest extends CakeTestCase {
|
|||
$this->assertRegExp('/"' . $key . '"/', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple select elements should always be secured as they always participate
|
||||
* in the POST data.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testSelectMultipleSecureWithNoOptions() {
|
||||
$this->Form->request['_Token'] = array('key' => 'testkey');
|
||||
$this->assertEquals(array(), $this->Form->fields);
|
||||
|
||||
$result = $this->Form->select(
|
||||
'Model.select',
|
||||
array(),
|
||||
array('multiple' => true)
|
||||
);
|
||||
$this->assertEquals(array('Model.select'), $this->Form->fields);
|
||||
}
|
||||
/**
|
||||
* When a select box has no options it should not be added to the fields list
|
||||
* as it always fail post validation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue