I'm writing functional tests for a controller that registers a new user in the app.
The test I'm writing fails because of a 500 HTTP error.
I'm using
$response = $client->getResponse();
print_r($response->getContent());exit;
to print the HTML to see what is happening but the HTML is incomplete in my console (PHPStorm) so i don't know exactly what is happening and cannot find the error to solve it.
Any ideas about how to understand what is happening and what is causing the error?
May be these can help: there is a
test.log
file inapp/logs
folder, you can remove it, run the tests, when the error happens open the newly generated file, read what happend, that's it.Or you add
DebugBundle
toregisterBundles
method inAppKernel.php
file, and use itsdump()
method, like this: