diff --git a/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php b/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php index 3de593d9406b..74af6f1b1d62 100644 --- a/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php +++ b/src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php @@ -24,13 +24,17 @@ public function refreshDatabase() RefreshDatabaseState::$lazilyRefreshed = true; - $shouldMockOutput = $this->mockConsoleOutput; - - $this->mockConsoleOutput = false; + if (property_exists($this, 'mockConsoleOutput')) { + $shouldMockOutput = $this->mockConsoleOutput; + + $this->mockConsoleOutput = false; + } $this->baseRefreshDatabase(); - $this->mockConsoleOutput = $shouldMockOutput; + if (property_exists($this, 'mockConsoleOutput')) { + $this->mockConsoleOutput = $shouldMockOutput; + } }; $database->beforeStartingTransaction($callback);