Testing controller method |
@kilishan, in need to test a returned value of one of the method of the controller. And just need a specific to set a specific query param in the url.
I have tried to test the controller with the the controller trait, or just make an instance of the controller if a new custom request in the initController method. I can get the body of the request correctly (with $this->request->getJSON()), but not the url query (with $this->request->getGet()) even if i set it in the uri object of the request. My function works in the application but looks like i cannot get by testing. |
Messages In This Thread |
Testing controller method - by jojo - 12-19-2021, 09:47 PM
RE: Testing controller method - by jojo - 12-20-2021, 07:20 PM
RE: Testing controller method - by kenjis - 12-20-2021, 07:59 PM
RE: Testing controller method - by jojo - 12-20-2021, 08:11 PM
RE: Testing controller method - by kenjis - 12-20-2021, 10:02 PM
RE: Testing controller method - by jojo - 12-20-2021, 10:09 PM
RE: Testing controller method - by kilishan - 12-20-2021, 10:19 PM
RE: Testing controller method - by jojo - 12-20-2021, 10:37 PM
|