title: Sending a POST request with PHPUnit
body: <p>I have a symfony website, and Im trying to do some unit testing. I have this kind of test where I try to submit something:</p>
  
  <pre><code>&lt;?php
  
  namespace Acme\AcmeBundle\Tests\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
  
  class HomeControllerTest extends WebTestCase {
  
      public function testrandomeThings() {
  
          $client = static::createClient();
          $crawler = $client-&gt;request(
              'POST',
              '/',
              array(
                  "shopNumber"        =&gt; 0099,
                  "cardNumber"        =&gt; 231,
                  "cardPIN"           =&gt; "adasd"),
              array(),
              array());
          }
  </code></pre>
  
  <p>but I dont think that the data Im sending is being received in the controler:</p>
  
  <pre><code>class HomeController extends Controller
  {
      public function indexAction()
      {
  
          var_dump($_POST);
          die;
          return $this-&gt;render('AcmeBundle:Home:index.html.twig');
      }
  
  }
  </code></pre>
  
  <p>the <code>var_dump</code> is actually returning me an empty array.</p>
  
  <p>What am I missing to send information through my POST request?</p>