Hi,
I’m currently writing tests for controllers. Some of the actions checks if the request is an ajax one or throws an exception, with if ($this->request->is('ajax')) {}
.
How can I test this actions ?
I read almost everywhere that the test have to change the headers but I have no idea on how to achieve this with PHPUnit 5.5
Your ideas are more than welcome.