public function KernelTestBase::tearDownCloseDatabaseConnection in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::tearDownCloseDatabaseConnection()
@after
Additional tear down method to close the connection at the end.
File
- core/
tests/ Drupal/ KernelTests/ KernelTestBase.php, line 685 - Contains \Drupal\KernelTests\KernelTestBase.
Class
- KernelTestBase
- Base class for functional integration tests.
Namespace
Drupal\KernelTestsCode
public function tearDownCloseDatabaseConnection() {
// Destroy the database connection, which for example removes the memory
// from sqlite in memory.
foreach (Database::getAllConnectionInfo() as $key => $targets) {
Database::removeConnection($key);
}
}