Welcome Guest, Not a member yet? Register   Sign In
Testing JSON/XML requests with Feature Tests

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 https://github.com/codeigniter4/CodeIgniter4/pull/3725.

Theme © iAndrew 2016 - Forum software by © MyBB