title: Authentication Fail at Functional Test in Symfony 3
body: <p>I am newbie for Symfony. I am trying do functional test for UserController. But I don't know how can do it. Because response 401 not equals 200. How can I skip authentication. My codes below:</p>
  
  <pre><code>    public function testGetAction() {
      $expected = array(
          'user'=&gt;
              array(
                  'id'        =&gt; 1,
                  'tcId'      =&gt; "23456789415",
                  'email'     =&gt; '*********',
                  'firstName' =&gt; '****',
                  'lastName'  =&gt; '****'
              )
  
      );
  
      $expect = json_encode($expected);
  
      $fixtures = array('AppBundle\DataFixtures\ORM\LoadUserData');
      $this-&gt;loadFixtures($fixtures);
      $users = LoadUserData::$users;
  
  
      $this-&gt;client-&gt;request('GET', 'ajax/users/'.$users[0]-&gt;getTcId(), array('ACCEPT' =&gt; 'application/json'));
      $response = $this-&gt;client-&gt;getResponse();
  
      $content = $response-&gt;getContent();
  
      $this-&gt;assertJsonResponse($response, 200);
  
      $this-&gt;assertEquals($expect , $content);
  }
  </code></pre>
  
  <p>And my problem is here:</p>
  
  <pre><code>3) AppBundle\Tests\Controller\UserControllerTest::testGetAction
     {"code":401,"message":"Authentication Required"}
     Failed asserting that 401 matches expected 200.
  </code></pre>