Last active
March 7, 2018 21:41
-
-
Save aaroncadrian/8f449e70f7e9584cd746707ed6595754 to your computer and use it in GitHub Desktop.
Method to disableExceptionHandling in tests so that you can fully inspect the error with phpunit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function disableExceptionHandling() | |
{ | |
$this->app->instance(\Illuminate\Contracts\Debug\ExceptionHandler::class, new class extends \App\Exceptions\Handler { | |
public function __construct() {} | |
public function report(\Exception $e) {} | |
public function render($request, \Exception $e) | |
{ | |
throw $e; | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment