You are here

public function ControllerTest::tearDown in MongoDB 8.2

Overrides BrowserTestBase::tearDown

File

modules/mongodb_watchdog/tests/src/Functional/ControllerTest.php, line 192

Class

ControllerTest
Test the MongoDB report controllers.

Namespace

Drupal\Tests\mongodb_watchdog\Functional

Code

public function tearDown() : void {

  // Get the database before container is torn down.
  $database = $this->container
    ->get(MongoDb::SERVICE_DB_FACTORY)
    ->get(Logger::DB_LOGGER);

  // Might trigger some more log insertions, so do not drop yet.
  parent::tearDown();
  $database
    ->drop();
}