title: 404 status code in phpunit
body: <p>I'm trying to functional test the HTTP status code and all my request return 404. I'm using symfony2 and api rest, and here's the code:</p>
  
  <pre><code>class UserControllerTest extends WebTestCase
  {
  
  public function testdeleteAction()
  {
      $client = $this-&gt;createClient();
      // $client   = static::createClient();
      $crawler  = $client-&gt;request('DELETE','/user',array(),array(),array('CONTENT_TYPE' =&gt; 'application/json'),array());
      $response = $client-&gt;getResponse();
      // print_r($response);
      // exit();
      // $this-&gt;assertTrue($response-&gt;isSuccessful());
      $this-&gt;assertSame(Response::HTTP_CREATED, $response-&gt;getStatusCode());
  
  }
  public function testpeopleAroundAction()
  {
      $tab = array(
          "images" =&gt; array(
              "smallImage"=&gt;array(
                      "w"=&gt;"130",
                      "h"=&gt;"100",
                      "density"=&gt;"2"
                  ),
              "bigImages"=&gt;array(
                      "w"=&gt;"1400",
                      "h"=&gt;"700",
                      "density"=&gt;"2"
                  )
              )
          );
      $tab = json_encode($tab);
      $client   = static::createClient();
      $crawler  = $client-&gt;request('POST', '/users/around',array(),array(),array('CONTENT_TYPE' =&gt; 'application/json'),$tab);
      $response = $client-&gt;getResponse();
      $this-&gt;assertSame(Response::HTTP_CREATED, $response-&gt;getStatusCode());
  }
  }
  </code></pre>
  
  <p>here is code of my routing in my bundle :</p>
  
  <pre><code>bla_api_delete_account:
  pattern:  /user.{_format}
  defaults: { _controller: BLAApiBundle:User:delete, _format: ~ }
  requirements:
      _method: DELETE
  bla_api_get_users_around:
  pattern:  /users/around.{_format}
  defaults: { _controller: BLAApiBundle:User:peopleAround, _format: ~ }
  requirements:
      _method: Post
  </code></pre>
  
  <p>when I run the command </p>
  
  <pre><code>phpunit -c app
  </code></pre>
  
  <p>i get :</p>
  
  <pre><code>1) BLA\ApiBundle\Tests\Controller\UserControllerTest::testdeleteAction
  Failed asserting that 404 is identical to 201.
  
  2) BLA\ApiBundle\Tests\Controller\UserControllerTest::testpeopleAroundAction
  Failed asserting that 404 is identical to 201.
  </code></pre>
  
  <p>Any help please</p>