From cbe0736feb6e243c7ffbea3d7bc22e6b76ca4146 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 22 Jun 2020 13:13:56 -0500 Subject: [PATCH] Fix sqlite test failure --- tests/Unit/SqliteTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Unit/SqliteTest.php b/tests/Unit/SqliteTest.php index c3c3afa555..6a83034d3c 100644 --- a/tests/Unit/SqliteTest.php +++ b/tests/Unit/SqliteTest.php @@ -43,7 +43,9 @@ class SqliteTest extends TestCase $this->assertNotEmpty($output, 'Migrations not run'); } catch (QueryException $queryException) { preg_match('/Migrating: (\w+)$/', Artisan::output(), $matches); - $this->fail("Could not run migration {$matches[1]}) on SQLite\n\n" . $queryException->getMessage()); + $migration = $matches[1] ?? '?'; + $output = isset($matches[1]) ? '' : "\n\n" . Artisan::output(); + $this->fail($queryException->getMessage() . $output . "\n\nCould not run migration {$migration}) on SQLite"); } $count = \DB::connection($this->connection)->table('alert_templates')->count();