diff --git a/tests/TestCase.php b/tests/TestCase.php index 667b7f9f..867b06f1 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -42,4 +42,12 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase } return $this->withSession(['uid' => $role->uid, 'token' => $role->getToken()]); } + + protected function tearDown() + { + $this->beforeApplicationDestroyed(function () { + DB::disconnect(); + }); + parent::tearDown(); + } }