jbunel's avatar

[Lumen 5.4] Post data always empty with PHPunit

Hello,

When i try to send post data with $this->post method in my test controller, post data are always empty but when i test through postman, it works. Do you have an idea ?

Thanks, Julien.

0 likes
1 reply
s1728k's avatar
s1728k
Best Answer
Level 1

hi

you use double quotes in your json post body. if you use single quotes lumen give this error. i faced this problem. there fore i am sharing.

Please or to participate in this conversation.