|
|
@@ -1925,6 +1925,24 @@ class FormHelperTest extends CakeTestCase {
|
|
|
$this->assertTags($result, $expected);
|
|
|
|
|
|
$result = $this->Form->input('Contact.field', array(
|
|
|
+ 'type' => 'text', 'error' => array('attributes' => array('class' => 'error'))
|
|
|
+ ));
|
|
|
+ $expected = array(
|
|
|
+ 'div' => array('class' => 'input text error'),
|
|
|
+ 'label' => array('for' => 'ContactField'),
|
|
|
+ 'Field',
|
|
|
+ '/label',
|
|
|
+ 'input' => array(
|
|
|
+ 'type' => 'text', 'name' => 'data[Contact][field]',
|
|
|
+ 'id' => 'ContactField', 'class' => 'form-error'
|
|
|
+ ),
|
|
|
+ array('div' => array('class' => 'error')),
|
|
|
+ 'Badness!',
|
|
|
+ '/div'
|
|
|
+ );
|
|
|
+ $this->assertTags($result, $expected);
|
|
|
+
|
|
|
+ $result = $this->Form->input('Contact.field', array(
|
|
|
'div' => array('tag' => 'span'), 'error' => array('attributes' => array('wrap' => false))
|
|
|
));
|
|
|
$expected = array(
|