Applying patch from ticket #2417

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4856 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
dho 2007-04-13 11:56:03 +00:00
parent 74653e5fac
commit c9d4fa6451
2 changed files with 4 additions and 1 deletions

View file

@ -462,7 +462,7 @@ class FormHelper extends AppHelper {
$out = $before . $out . $between . $this->{$type}($tagName, $options);
break;
case 'file':
$out = $before . $out . $between . $this->file($tagName);
$out = $before . $out . $between . $this->file($tagName, $options);
break;
case 'select':
$options = am(array('options' => array()), $options);

View file

@ -187,6 +187,9 @@ class FormHelperTest extends UnitTestCase {
$result = $this->Form->input('test', array('options' => array('First', 'Second'), 'empty' => true));
$this->assertPattern('/<select [^<>]+>\s+<option value=""\s*><\/option>\s+<option value="0"/', $result);
$result = $this->Form->input('Model/field', array('type' => 'file', 'class' => 'textbox'));
$this->assertPattern('/class="textbox"/', $result);
}
function testLabel() {