@@ 671-677 (lines=7) @@ | ||
668 | * |
|
669 | * @return void |
|
670 | */ |
|
671 | public function testNoCheckboxLocking() { |
|
672 | $this->Form->request['_Token'] = array('key' => 'foo'); |
|
673 | $this->assertSame(array(), $this->Form->fields); |
|
674 | ||
675 | $this->Form->checkbox('check', array('value' => '1')); |
|
676 | $this->assertSame($this->Form->fields, array('check')); |
|
677 | } |
|
678 | ||
679 | /** |
|
680 | * testFormSecurityFields method |
|
@@ 5399-5409 (lines=11) @@ | ||
5396 | * |
|
5397 | * @return void |
|
5398 | */ |
|
5399 | public function testSelectMultipleSecureWithNoOptions() { |
|
5400 | $this->Form->request['_Token'] = array('key' => 'testkey'); |
|
5401 | $this->assertEquals(array(), $this->Form->fields); |
|
5402 | ||
5403 | $this->Form->select( |
|
5404 | 'Model.select', |
|
5405 | array(), |
|
5406 | array('multiple' => true) |
|
5407 | ); |
|
5408 | $this->assertEquals(array('Model.select'), $this->Form->fields); |
|
5409 | } |
|
5410 | /** |
|
5411 | * When a select box has no options it should not be added to the fields list |
|
5412 | * as it always fail post validation. |