mardi 29 janvier 2019

disable exception handling in laravel test

I've been trying to disable exception handling in my test so I can see the errors, but it's not working even if I intentionally break the code.

I'm just getting this generic response and it's not helping much.

Invalid JSON was returned from the route.

I've tried all solutions I can find online, but none of them is working.

I tried adding $this->disableExceptionHandling() at the top of the test method, it didn't work. I also tried the tutorial from Adam Wathan, (https://gist.github.com/adamwathan/125847c7e3f16b88fa33a9f8b42333da) that didn't work also.

I've even tried editing the Handler.php file

public function render($request, Exception $exception)
{
    throw $exception;
    // return parent::render($request, $exception);
}

It's still now working.

Please how can I fix this.

Any help would be appreciated.

Thanks.

Aucun commentaire:

Enregistrer un commentaire