[Form] Fixed typo in a test after #21877
This commit is contained in:
parent
ea8025b863
commit
b21a0978de
@ -513,22 +513,20 @@ class SimpleFormTest extends AbstractFormTest
|
||||
$this->assertSame('default', $form->getData());
|
||||
}
|
||||
|
||||
public function testPresSetDataChangesDataIfDataIsLocked()
|
||||
public function testPreSetDataChangesDataIfDataIsLocked()
|
||||
{
|
||||
$config = new FormConfigBuilder('name', null, $this->dispatcher);
|
||||
$config
|
||||
->setData('default')
|
||||
->setDataLocked(true)
|
||||
->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
|
||||
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
|
||||
$event->setData('foobar');
|
||||
});
|
||||
$form = new Form($config);
|
||||
|
||||
$form->submit(false);
|
||||
|
||||
$this->assertTrue($form->isValid());
|
||||
|
||||
$this->assertSame('foobar', $form->getData());
|
||||
$this->assertSame('foobar', $form->getNormData());
|
||||
$this->assertSame('foobar', $form->getViewData());
|
||||
}
|
||||
|
||||
public function testSubmitConvertsEmptyToNullIfNoTransformer()
|
||||
|
Reference in New Issue
Block a user