You are here

public function MongoDbTestBase::tearDown in MongoDB 8.2

Overrides KernelTestBase::tearDown

File

modules/mongodb/tests/src/Kernel/MongoDbTestBase.php, line 122

Class

MongoDbTestBase
Class MongoDbTestBase provides basic setUp()/tearDown() for MongoDB.

Namespace

Drupal\Tests\mongodb\Kernel

Code

public function tearDown() : void {
  $clientFactory = new ClientFactory($this->settings);
  $databaseFactory = new DatabaseFactory($clientFactory, $this->settings);
  $databaseFactory
    ->get(static::DB_DEFAULT_ALIAS)
    ->drop();
  parent::tearDown();
}