public function testShouldConvertNestedUploadedFilesWithPhpBug() {
$tmpFile = $this
->createTempFile();
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0);
$bag = new FileBag(array(
'child' => array(
'name' => array(
'sub' => array(
'file' => basename($tmpFile),
),
),
'type' => array(
'sub' => array(
'file' => 'text/plain',
),
),
'tmp_name' => array(
'sub' => array(
'file' => $tmpFile,
),
),
'error' => array(
'sub' => array(
'file' => 0,
),
),
'size' => array(
'sub' => array(
'file' => 100,
),
),
),
));
$files = $bag
->all();
$this
->assertEquals($file, $files['child']['sub']['file']);
}