You are here

public function FileBagTest::testShouldNotConvertNestedUploadedFiles in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/FileBagTest.php \Symfony\Component\HttpFoundation\Tests\FileBagTest::testShouldNotConvertNestedUploadedFiles()

File

vendor/symfony/http-foundation/Tests/FileBagTest.php, line 120

Class

FileBagTest
FileBagTest.

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testShouldNotConvertNestedUploadedFiles() {
  $tmpFile = $this
    ->createTempFile();
  $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0);
  $bag = new FileBag(array(
    'image' => array(
      'file' => $file,
    ),
  ));
  $files = $bag
    ->all();
  $this
    ->assertEquals($file, $files['image']['file']);
}