[Form] Fixed wrong usages of the "text" type
This commit is contained in:
parent
da43309f07
commit
91496229ab
@ -910,7 +910,7 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
$options['auto_initialize'] = false;
|
||||
|
||||
if (null === $type && null === $this->config->getDataClass()) {
|
||||
$type = 'text';
|
||||
$type = 'Symfony\Component\Form\Extension\Core\Type\TextType';
|
||||
}
|
||||
|
||||
if (null === $type) {
|
||||
|
@ -172,13 +172,13 @@ class CompoundFormTest extends AbstractFormTest
|
||||
|
||||
$this->factory->expects($this->once())
|
||||
->method('createNamed')
|
||||
->with('foo', 'text', null, array(
|
||||
->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array(
|
||||
'bar' => 'baz',
|
||||
'auto_initialize' => false,
|
||||
))
|
||||
->will($this->returnValue($child));
|
||||
|
||||
$this->form->add('foo', 'text', array('bar' => 'baz'));
|
||||
$this->form->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz'));
|
||||
|
||||
$this->assertTrue($this->form->has('foo'));
|
||||
$this->assertSame($this->form, $child->getParent());
|
||||
@ -191,14 +191,14 @@ class CompoundFormTest extends AbstractFormTest
|
||||
|
||||
$this->factory->expects($this->once())
|
||||
->method('createNamed')
|
||||
->with('0', 'text', null, array(
|
||||
->with('0', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array(
|
||||
'bar' => 'baz',
|
||||
'auto_initialize' => false,
|
||||
))
|
||||
->will($this->returnValue($child));
|
||||
|
||||
// in order to make casting unnecessary
|
||||
$this->form->add(0, 'text', array('bar' => 'baz'));
|
||||
$this->form->add(0, 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz'));
|
||||
|
||||
$this->assertTrue($this->form->has(0));
|
||||
$this->assertSame($this->form, $child->getParent());
|
||||
@ -211,7 +211,7 @@ class CompoundFormTest extends AbstractFormTest
|
||||
|
||||
$this->factory->expects($this->once())
|
||||
->method('createNamed')
|
||||
->with('foo', 'text')
|
||||
->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType')
|
||||
->will($this->returnValue($child));
|
||||
|
||||
$this->form->add('foo');
|
||||
|
Reference in New Issue
Block a user