title: PHPUnit LogicException: The request was not redirected. Symfony
body: <p>I am trying to test a simple registration with phpunit with a redirect, I have all the time this error:</p>
  
  <p><a href="https://i.stack.imgur.com/DLw8m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DLw8m.png" alt="enter image description here"></a></p>
  
  <p>Test class:</p>
  
  <pre><code>&lt;?php
  
  namespace Tests\AppBundle\Services;
  
  use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
  
  class SecuriteTest extends WebTestCase
  {
  
      private $user;
  
      public function __construct() {
          $this-&gt;user = static::createClient();
      }
  
      public function testsendCreateAccountMail(){
  
          $crawler = $this-&gt;user-&gt;request('GET', '/inscription');
  
          $this-&gt;assertEquals(1, $crawler-&gt;filter('h1:contains("Informations personnelles")')-&gt;count());
  
          $form = $crawler-&gt;selectButton('submitInscription')-&gt;form();
  
          $form['inscription[gender]']     = 'Masculin';
          $form['inscription[name]']       = 'Test';
          $form['inscription[firstName]']      = 'Test';
          $form['inscription[username]']    = 'Test-25@gmail.com';
          $form['inscription[birthDate]']    =  '05/10/1992';
          $form['inscription[pseudo]']    = 'Test';
          $form['inscription[password][first]']    = 'blablabla';
          $form['inscription[password][second]']    = 'blablabla';
          $form['inscription[account]']    = 'Particulier';
          $form['inscription[mentionsLegales]']    = '1';
  
          $this-&gt;user-&gt;submit($form);
  
          $crawler = $this-&gt;user-&gt;followRedirect();
  
          $this-&gt;assertEquals(1, $crawler-&gt;filter('.testFlash:contains("Vous allez recevoir une demande de confirmation sur votre adresse email")')-&gt;count());
  
      }
  }
  </code></pre>
  
  <p>I also try to test with a contact form with only 3 inputs, I still have the same error.</p>
  
  <p>Thank you</p>