title: Testing a file upload to a form in a Behat feature file
body: <p>I am quite new to writing Behat test suites and I am currently trying to flesh out my existing feature file with an added test to test an uploaded file.</p>
  
  <p>This is what I have come up with so far.</p>
  
  <pre><code>  Scenario: Submitting a valid asset form and uploading a file
      When I submit a asset form with values:
        | name               | type  | position | active | file                                 |
        | St Andrews Release | image | 1        | 1      | /web/images/product/icon/default.jpg |
      Then the form should be valid
      And the entity form entity should have the following values
        | name               | type  | position | active | file                                 |
        | St Andrews Release | image | 1        | 1      | /web/images/product/icon/default.jpg |
        Failed asserting that null matches expected '/web/images/product/icon/default.jpg'.
      And the entity form entity should be persisted correctly
  </code></pre>
  
  <p>This is the method handling the scenario:</p>
  
  <pre><code>   /**
       * @When I submit a asset form with values:
       */
      public function iSubmitAssetFormWithValues(TableNode $table)
      {
          $data       = $table-&gt;getColumnsHash()[0];
          $this-&gt;form = $this-&gt;submitTheForm('crmpicco.asset.type', $this-&gt;entity, $data);
      }
  </code></pre>
  
  <p>The <code>submitTheForm</code> method returns a <code>Symfony\Component\Form\FormInterface</code>.</p>
  
  <p>Am I along the right lines? I am currently getting an error:</p>
  
  <blockquote>
    <p>Failed asserting that null matches expected
    '/web/images/product/swatch/default.jpg'.</p>
  </blockquote>