test: disconnect database after each test
This commit is contained in:
parent
18c0755aa2
commit
f3220ee526
|
|
@ -42,4 +42,12 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||||
}
|
}
|
||||||
return $this->withSession(['uid' => $role->uid, 'token' => $role->getToken()]);
|
return $this->withSession(['uid' => $role->uid, 'token' => $role->getToken()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function tearDown()
|
||||||
|
{
|
||||||
|
$this->beforeApplicationDestroyed(function () {
|
||||||
|
DB::disconnect();
|
||||||
|
});
|
||||||
|
parent::tearDown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user