I try to send raw data in my WebTestCase in PhpUnit and it doesn't work :
$jsonEvent = '{
"type": "invoice.payment_succeeded",
}';
$this->client->request(
'POST',
'/api/v1/stripe/webhook',
[],
[],
['CONTENT_TYPE' => 'application/json'],
$jsonEvent
);
and i try to get data like this :
$input = file_get_contents("php://input");
var_dump($input);
But $input
is empty
Not sure but perhaps it's not possible to get content input like that in webtestcase ?
Thanks in advance.