title: testing a POST using phpunit in laravel 4
body: <p>I have a route that does a POST to create data and I'm trying to test if everything should be working the way it should be.</p>
  
  <p>I have a json string that will have the values that i want to test but so far the test is always failing when I run the test using phpunit:</p>
  
  <p>Also,I know the json string is just a string but I'm also unsure of how to use the json string to test for input.</p>
  
  <p>my route:</p>
  
  <pre><code>Route::post('/flyer', 'flyersController@store');
  
   public function testFlyersCreation()
  {
      $this-&gt;call('POST', 'flyers');
  
      //Create test json string
      $json = '{ "name": "Test1", "email": "test@gmail.com", "contact": "11113333" }';
  
      var_dump(json_decode($json));
  
  
  
  }
  </code></pre>
  
  <p>When i run phpunit, my error points to the call POST that says "undefined index: name"</p>