Skip to content

Commit 5ef2456

Browse files
committed
[Form] Remove a redundant test.
This is exactly the same as testValidateTokenOnSubmitIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName().
1 parent 0d3a272 commit 5ef2456

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -278,37 +278,6 @@ public function testValidateTokenOnSubmitIfRootAndCompoundUsesTypeClassAsIntenti
278278
$this->assertSame($valid, $form->isValid());
279279
}
280280

281-
/**
282-
* @dataProvider provideBoolean
283-
*/
284-
public function testValidateTokenOnBindIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName($valid)
285-
{
286-
$this->csrfProvider->expects($this->once())
287-
->method('isCsrfTokenValid')
288-
->with('Symfony\Component\Form\Extension\Core\Type\FormType', 'token')
289-
->will($this->returnValue($valid));
290-
291-
$form = $this->factory
292-
->createNamedBuilder('', 'form', null, array(
293-
'csrf_field_name' => 'csrf',
294-
'csrf_provider' => $this->csrfProvider,
295-
'compound' => true,
296-
))
297-
->add('child', 'text')
298-
->getForm();
299-
300-
$form->submit(array(
301-
'child' => 'foobar',
302-
'csrf' => 'token',
303-
));
304-
305-
// Remove token from data
306-
$this->assertSame(array('child' => 'foobar'), $form->getData());
307-
308-
// Validate accordingly
309-
$this->assertSame($valid, $form->isValid());
310-
}
311-
312281
public function testFailIfRootAndCompoundAndTokenMissing()
313282
{
314283
$this->csrfProvider->expects($this->never())

0 commit comments

Comments
 (0)