Adding test to disprove ticket #2763

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5276 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
dho 2007-06-14 15:03:10 +00:00
parent ac2cc7006b
commit a0184d2b41

View file

@ -827,6 +827,10 @@ class FormHelperTest extends CakeTestCase {
$result = $this->Form->checkbox('Model.field', array('id'=>'theID', 'value' => 'myvalue'));
$this->assertEqual($result, '<input type="checkbox" name="data[Model][field]" type="checkbox" id="theID" value="myvalue" class="form-error" />');
$this->Form->validationErrors['Model']['field'] = 0;
$result = $this->Form->checkbox('Model.field', array('value' => 'myvalue'));
$this->assertEqual($result, '<input type="checkbox" name="data[Model][field]" type="checkbox" value="myvalue" id="ModelField" />');
$this->Form->validationErrors['Model']['field'] = 1;
$this->Form->data['Contact']['published'] = 1;
$result = $this->Form->checkbox('Contact.published', array('id'=>'theID'));