Merge branch '2.7'

* 2.7:
  fixed unit tests
This commit is contained in:
Fabien Potencier 2014-12-30 11:15:34 +01:00
commit f4b498c46d

View File

@ -284,15 +284,15 @@ class FormTypeCsrfExtensionTest extends TypeTestCase
*/
public function testValidateTokenOnBindIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName($valid)
{
$this->csrfProvider->expects($this->once())
->method('isCsrfTokenValid')
->with('Symfony\Component\Form\Extension\Core\Type\FormType', 'token')
$this->tokenManager->expects($this->once())
->method('isTokenValid')
->with(new CsrfToken('Symfony\Component\Form\Extension\Core\Type\FormType', 'token'))
->will($this->returnValue($valid));
$form = $this->factory
->createNamedBuilder('', 'form', null, array(
'csrf_field_name' => 'csrf',
'csrf_provider' => $this->csrfProvider,
'csrf_token_manager' => $this->tokenManager,
'compound' => true,
))
->add('child', 'text')