title: How to set file post properly PhpUnit
body: <p>I'm trying to set a test to upload a file. 
  In the controller I need to check if everyting is ok (form validation). </p>
  
  <p>The problem is the response gives me an error $request->dataFile->getClientOriginalExtension() , (vendor/symfony/http-foundation/File/UploadedFile.php) </p>
  
  <p>Looks like the dataFile, or request or.... I dont know how to set it.</p>
  
  <pre><code>/** 
          @test 
          @group formPostFile
  */
  public function formPostFile()
  {
      $test_file_path  = base_path().'/httpdocs/test/Excel.xlsx';
      $this-&gt;assertTrue(file_exists($test_file_path), $test_file_path.' Test file does not exist');
      $_FILE = [
          'filename' =&gt; [
              'name'     =&gt; $test_file_path,
              'type'     =&gt; 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
              'size'     =&gt; 10336,
              'tmp_name' =&gt; $test_file_path,
              'error'    =&gt; 0
          ]
      ];
      $data = [
          'id' =&gt; '2',
          'dataFile' =&gt; $_FILE
      ];
      $response = $this-&gt;post('/excel', $data);
      dd($response-&gt;getContent());
  
  }
  </code></pre>