Remove usages of deprecated constants

This commit is contained in:
Christophe Coevoet 2014-12-29 22:18:50 +01:00
parent 0469ea82b1
commit 6c00c226c2
3 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ class BindRequestListener implements EventSubscriberInterface
public static function getSubscribedEvents()
{
// High priority in order to supersede other listeners
return array(FormEvents::PRE_BIND => array('preBind', 128));
return array(FormEvents::PRE_SUBMIT => array('preBind', 128));
}
public function preBind(FormEvent $event)

View File

@ -297,7 +297,7 @@ class FormTypeCsrfExtensionTest extends TypeTestCase
->add('child', 'text')
->getForm();
$form->bind(array(
$form->submit(array(
'child' => 'foobar',
'csrf' => 'token',
));

View File

@ -109,10 +109,10 @@ class SimpleFormTest extends AbstractFormTest
}));
$config = new FormConfigBuilder('name', null, $this->dispatcher);
$config->addEventListener(FormEvents::PRE_BIND, array($mock, 'preBind'));
$config->addEventListener(FormEvents::PRE_SUBMIT, array($mock, 'preBind'));
$form = new Form($config);
$form->bind(false);
$form->submit(false);
$this->assertTrue($form->isValid());
$this->assertNull($form->getData());