title: Test an upload with PHPUnit in Laravel
body: <p>Currently, i try to test a file upload with PHPUnit for Laravel. After some searches, i found a first solution :</p>
  
  <pre><code>$file = new \Symfony\Component\HttpFoundation\File\UploadedFile(
              app_path() . '/tests/Files/default.png', 'default.png');
  
  $response = $this-&gt;call('POST', 'students', 
                  [
                     'firstname' =&gt; 'firstname', 
                     'lastname'  =&gt; 'lastname', 
                     'promotion' =&gt; '2016', 
                     'isCoop' =&gt; 1
                  ], 
                  [
                     'avatar' =&gt; [$file]
                  ]
  );
  </code></pre>
  
  <p>It works, but it failed when I push this code on Travis, and i'm not sure it's very clean to do that...</p>
  
  <p>You can see my test failed <a href="https://travis-ci.org/tomapp/trombinoscope/jobs/42182892" rel="nofollow">here</a>.</p>
  
  <p>Thank's you.</p>