php - Symfony Functional Testing: how to understand why the test fails (with a 500 Error) -


i'm writing functional tests controller registers new user in app.

the test i'm writing fails because of 500 http error.

i'm using

$response = $client->getresponse(); print_r($response->getcontent());exit; 

to print html see happening html incomplete in console (phpstorm) don't know happening , cannot find error solve it.

any ideas how understand happening , causing error?

may these can help: there test.log file in app/logs folder, can remove it, run tests, when error happens open newly generated file, read happend, that's it.

or add debugbundle registerbundles method in appkernel.php file, , use dump() method, this:

// appkernel.php if (in_array($this->getenvironment(), ['dev', 'test'])) {     ...     $bundles[] = new \symfony\bundle\debugbundle\debugbundle(); }  *****  // usage: public function testsomeaction() {     .....     $response = $client->getresponse();     dump($response);     die; } 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -