From 557b0017c222c769cfb4e47464c5a2b6828520cb Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 9 Jan 2020 13:48:57 +0100 Subject: [PATCH] Fix undefined property in WithFaker --- src/Illuminate/Foundation/Testing/WithFaker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Testing/WithFaker.php b/src/Illuminate/Foundation/Testing/WithFaker.php index fbcfc7687e30..ed0189afbc36 100644 --- a/src/Illuminate/Foundation/Testing/WithFaker.php +++ b/src/Illuminate/Foundation/Testing/WithFaker.php @@ -45,7 +45,7 @@ protected function makeFaker($locale = null) { $locale = $locale ?? config('app.faker_locale', Factory::DEFAULT_LOCALE); - if ($this->app->bound(Generator::class)) { + if (isset($this->app) && $this->app->bound(Generator::class)) { return $this->app->make(Generator::class, [$locale]); }