diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 70a8ec925ec..50aef0ed08a 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -22,7 +22,7 @@ class AppServiceProvider extends ServiceProvider */ public function register() { - if (App::environment('testing')) { + if (App::environment('testing') && class_exists(TestResponse::class)) { TestResponse::mixin(new TestResponseMacros); } }