Just a quick helper method you can add to your base TestCase
to make it easy to toggle exception handling on the fly. Improved a little bit from the sloppier version I used in the screencast :)
Update 2016-11-09:
At some point since I originally shared this snippet and the accompanying screencast, Laravel started binding App\Exceptions\Handler
under the Illuminate\Contracts\Debug\ExceptionHandler
interface instead of the concrete class, so I've updated the files below to account for that.
Thanks for this snippet, it makes the error in some cases way more verbose. There is only 1 but: You need to import the
Exception
namespace as it will throw an error that it is not compatible with the parentExceptionHandler
.