8000 add back test after fixing it · symfony/symfony@0daeba8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0daeba8

Browse files
committed
add back test after fixing it
1 parent bb54e40 commit 0daeba8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,26 @@ public function testSubmitMultipleFiles($method)
285285
$this->assertSame($file, $form->getData());
286286
}
287287

288+
/**
289+
* @dataProvider methodExceptGetProvider
290+
*/
291+
public function testSubmitFileWithNamelessForm($method)
292+
{
293+
$form = $this->createForm('', $method, true);
294+
$fileForm = $this->createBuilder('document', false, ['allow_file_upload' => true])->getForm();
295+
$form->add($fileForm);
296+
$file = $this->getUploadedFile();
297+
$this->setRequestData($method, [
298+
'document' => null,
299+
], [
300+
'document' => $file,
301+
]);
302+
$this->requestHandler->handleRequest($form, $this->request);
303+
304+
$this->assertTrue($form->isSubmitted());
305+
$this->assertSame($file, $fileForm->getData());
306+
}
307+
288308
/**
289309
* @dataProvider getPostMaxSizeFixtures
290310
*/

0 commit comments

Comments
 (0)
0