do not send email on unit testing

This commit is contained in:
2023-07-31 10:05:04 +10:00
parent d6524942f7
commit 6dc226ab0b

View File

@@ -10,6 +10,7 @@ use PDOException;
use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Symfony\Component\ErrorHandler\Exception\FlattenException;
@@ -64,8 +65,10 @@ class Handler extends ExceptionHandler
$this->reportable(function (Throwable $e) {
if ($this->shouldReport($e) === true) {
if(App::runningUnitTests() === false) {
$this->sendEmail($e);
}
}
});
}