public function FileBagTest::testShouldConvertNestedUploadedFilesWithPhpBug in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/FileBagTest.php \Symfony\Component\HttpFoundation\Tests\FileBagTest::testShouldConvertNestedUploadedFilesWithPhpBug()
File
- vendor/
symfony/ http-foundation/ Tests/ FileBagTest.php, line 91
Class
- FileBagTest
- FileBagTest.
Namespace
Symfony\Component\HttpFoundation\TestsCode
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']);
}