[Form] Swap default textarea rows/cols values
This commit is contained in:
parent
13d890c880
commit
1e623469a9
@ -29,8 +29,8 @@ class TextareaField extends Field
|
||||
return $this->generator->contentTag('textarea', $content, array_merge(array(
|
||||
'id' => $this->getId(),
|
||||
'name' => $this->getName(),
|
||||
'rows' => 30,
|
||||
'cols' => 4,
|
||||
'rows' => 4,
|
||||
'cols' => 30,
|
||||
), $attributes));
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ class TextareaFieldTest extends \PHPUnit_Framework_TestCase
|
||||
$field = new TextareaField('name');
|
||||
$field->setData('asdf');
|
||||
|
||||
$html = '<textarea id="name" name="name" rows="30" cols="4" class="foobar">asdf</textarea>';
|
||||
$html = '<textarea id="name" name="name" rows="4" cols="30" class="foobar">asdf</textarea>';
|
||||
|
||||
$this->assertEquals($html, $field->render(array('class' => 'foobar')));
|
||||
}
|
||||
@ -21,7 +21,7 @@ class TextareaFieldTest extends \PHPUnit_Framework_TestCase
|
||||
$field = new TextareaField('name');
|
||||
$field->setData('<&&');
|
||||
|
||||
$html = '<textarea id="name" name="name" rows="30" cols="4"><&&</textarea>';
|
||||
$html = '<textarea id="name" name="name" rows="4" cols="30"><&&</textarea>';
|
||||
|
||||
$this->assertEquals($html, $field->render());
|
||||
}
|
||||
|
Reference in New Issue
Block a user