CodeIgniter Forums

Full Version: Testing JSON/XML requests with Feature Tests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Currently, when creating an API that is expecting to receive a JSON or XML request body, the Feature Test functionality doesn't work because the body of the request is never set. I would request that we find a way to be able to use Feature Tests when the controller is using the $request->getJson() or $request->getBody() methods to get the request body for use in an API.

I have a solution for this and have created a PR at