title: Laravel 5.5 phpunit testing form validation
body: <p>I'm trying to write some tests for my forms in order to confirm the validators retrieve the expected errors when required.
  The form only has 3 fields: <code>name</code>, <code>discount</code> and <code>expiration</code> and the validator looks like this:</p>
  
  <pre><code>$this-&gt;validate($request, [
      'name'          =&gt; 'required',
      'discount'      =&gt; 'required|numeric|between:1,100',
      'expiration'    =&gt; 'required|date_format:d/m/Y',
  ]);
  </code></pre>
  
  <p>That works fine both when submitting the form and when running the tests with phpunit using the following code:</p>
  
  <pre><code>/**
   * Discount must be numeric check
   */
  $response = $this-&gt;post(route('offer.create'), [
      'name'          =&gt; $faker-&gt;sentence(4),
      'discount'      =&gt; 'asdasd',
      'expiration'    =&gt; $faker-&gt;dateTimeBetween('+1 days', '+5 months')
  ]);
  
  // Check errors returned
  $response-&gt;assertSessionHasErrors(['discount']);
  </code></pre>
  
  <p>Since discount is not numeric it throws the expected error and everybody is happy.</p>
  
  <p>Now, if I want to add a new rule to make sure that the expiration is equal or greater to today I add the <code>after:yesterday</code>rule leaving the validator like:</p>
  
  <pre><code>$this-&gt;validate($request, [
      'name'          =&gt; 'required',
      'discount'      =&gt; 'required|numeric|between:1,100',
      'expiration'    =&gt; 'required|date_format:d/m/Y|after:yesterday',
  ]);
  </code></pre>
  
  <p>That works fine when submitting the form. I get the error saying the discount is not numeric, but when testing with phpunit it doesn't get the error as expected:</p>
  
  <pre><code>1) Tests\Feature\CreateSpecialOfferTest::testCreateSpecialOffer
  Session missing error: expiration
  Failed asserting that false is true.
  </code></pre>
  
  <p>Why adding this new validation rule to <code>expiration</code>generates a false validation in <code>discount</code>? Is this a bug in the validator or am I missing something?</p>
  
  <p>Also:</p>
  
  <p>1 - is there a better way to test form validators?</p>
  
  <p>2 - is there an assert that is the opposite of assertSessionHasErrors() to check a certain error is <strong>NOT</strong> been thrown?</p>