Skip to content

Commit e39ff6b

Browse files
committed
fixed unit tests
1 parent 2298f1d commit e39ff6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,15 @@ public function testValidateTokenOnSubmitIfRootAndCompoundUsesTypeClassAsIntenti
284284
*/
285285
public function testValidateTokenOnBindIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName($valid)
286286
{
287-
$this->csrfProvider->expects($this->once())
288-
->method('isCsrfTokenValid')
289-
->with('Symfony\Component\Form\Extension\Core\Type\FormType', 'token')
287+
$this->tokenManager->expects($this->once())
288+
->method('isTokenValid')
289+
->with(new CsrfToken('Symfony\Component\Form\Extension\Core\Type\FormType', 'token'))
290290
->will($this->returnValue($valid));
291291

292292
$form = $this->factory
293293
->createNamedBuilder('', 'form', null, array(
294294
'csrf_field_name' => 'csrf',
295-
'csrf_provider' => $this->csrfProvider,
295+
'csrf_token_manager' => $this->tokenManager,
296296
'compound' => true,
297297
))
298298
->add('child', 'text')

0 commit comments

Comments
 (0)