Skip to content

Commit d5c21e9

Browse files
committed
Fix UT for Laravel v6
1 parent 3dc4c9a commit d5c21e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Feature/MySQL57/DBConnectionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public function testDBConnection()
5757
};
5858

5959
$generateMigrations = function () {
60+
// Needed for Laravel 6 and below.
61+
DB::setDefaultConnection('mysql8');
62+
6063
$this->artisan(
6164
'migrate:generate',
6265
[
@@ -92,6 +95,9 @@ public function testLogMigrationToAnotherSource()
9295
{
9396
$this->migrateGeneral('mysql57');
9497

98+
// Needed for Laravel 6 and below.
99+
DB::setDefaultConnection('mysql8');
100+
95101
$this->artisan(
96102
'migrate:generate',
97103
[

0 commit comments

Comments
 (0)