public function FileBagTest::testShouldConvertUploadedFilesWithPhpBug 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::testShouldConvertUploadedFilesWithPhpBug()
File
- vendor/
symfony/ http-foundation/ Tests/ FileBagTest.php, line 62
Class
- FileBagTest
- FileBagTest.
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testShouldConvertUploadedFilesWithPhpBug() {
$tmpFile = $this
->createTempFile();
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0);
$bag = new FileBag(array(
'child' => array(
'name' => array(
'file' => basename($tmpFile),
),
'type' => array(
'file' => 'text/plain',
),
'tmp_name' => array(
'file' => $tmpFile,
),
'error' => array(
'file' => 0,
),
'size' => array(
'file' => 100,
),
),
));
$files = $bag
->all();
$this
->assertEquals($file, $files['child']['file']);
}