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

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.
Reply


Messages In This Thread
Testing JSON/XML requests with Feature Tests - by Derek - 10-04-2020, 01:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB