Update: I was able to get some results in the meantime. My current test looks like this:
public function testPostMessagesContent()
{
$response = $this->call('POST', 'xml', array('key' => 'value'), array(), array(), array('content' => 'content'));
$this->assertContains('~', $response->getContent());
}
I only have the tilde there because I know it won't match so that I can see the whole response. In XmlController.php I have:
class XmlController extends Controller {
public function index(Request $request)
{
return $request;
}
}
My output from PHPUnit is as follows:
1) XmlTest::testPostMessagesContent
Failed asserting that 'POST xml HTTP/1.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
Content-Type: application/x-www-form-urlencoded
Host: localhost
User-Agent: Symfony/2.X
' contains "~".
Where are my parameters and my content? I feel like I am simply just using call() incorrectly.