|
@@ -70,7 +70,15 @@ class LockExtensionTest extends \PHPUnit_Framework_TestCase
|
|
|
$event = new FormEvent($form->reveal(), array());
|
|
|
|
|
|
$this->modelManager->getLockVersion(array())->willReturn(1);
|
|
|
- $form->add('_lock_version', 'hidden', array('mapped' => false, 'data' => 1))->shouldBeCalled();
|
|
|
+
|
|
|
+ $form->add(
|
|
|
+ '_lock_version',
|
|
|
+ // NEXT_MAJOR: remove the check and add the FQCN
|
|
|
+ method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')
|
|
|
+ ? 'Symfony\Component\Form\Extension\Core\Type\HiddenType'
|
|
|
+ : 'hidden',
|
|
|
+ array('mapped' => false, 'data' => 1)
|
|
|
+ )->shouldBeCalled();
|
|
|
|
|
|
$this->lockExtension->configureFormFields($formMapper);
|
|
|
$this->eventDispatcher->dispatch(FormEvents::PRE_SET_DATA, $event);
|