I am using the default PHPUnit that comes with Lumen. While I am able to create a mock post call to my link, I am unable to find a way to feed raw data to it.
Currently, to mock up JSON input, from official document, I can:
$this->json('POST', '/user', ['name' => 'Sally'])
->seeJson([
'created' => true,
]);
Or if I want simple form input, I can:
$this->post('/user', ['name' => 'Sally'])
->seeJsonEquals([
'created' => true,
]);
Is there a way I can insert raw body content to the post request? (Or at least a request with XML input? This is a server to receive callback from WeChat, where we have no choice but forced to use XML as WeChat wanted to use.)