public function FileBagTest::testShouldNotConvertNestedUploadedFiles

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/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']);
}