Skip to content

Commit

Permalink
Remove usages of deprecated constants
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Dec 29, 2014
1 parent 0469ea8 commit 6c00c22
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -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)
Expand Down
Expand Up @@ -297,7 +297,7 @@ public function testValidateTokenOnBindIfRootAndCompoundUsesTypeClassAsIntention
->add('child', 'text')
->getForm();

$form->bind(array(
$form->submit(array(
'child' => 'foobar',
'csrf' => 'token',
));
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Form/Tests/SimpleFormTest.php
Expand Up @@ -109,10 +109,10 @@ public function testFalseIsConvertedToNull()
}));

$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());
Expand Down

0 comments on commit 6c00c22

Please sign in to comment.