<?php

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
    use CreatesApplication;
}

<?php

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
	use CreatesApplication;

	protected function disableExceptionHandling()
	{
		$this->app->instance(ExceptionHandler::class, new class extends Handler {
			public function __construct()
			{
			}
			public function report(Exception $e)
			{
			}
			public function render($request, Exception $e)
			{
				throw $e;
			}
		});
	}
}

Add helper function for testing
Add helper function for testing

This function stop laravel from translating php errors into http errors
