You are here

protected function BrowserTestBase::tearDown in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::tearDown()
  2. 9 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::tearDown()
1 call to BrowserTestBase::tearDown()
WebDriverTestBase::tearDown in core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
2 methods override BrowserTestBase::tearDown()
ShutdownFunctionsTest::tearDown in core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php
WebDriverTestBase::tearDown in core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php

File

core/tests/Drupal/Tests/BrowserTestBase.php, line 444

Class

BrowserTestBase
Provides a test case for functional Drupal tests.

Namespace

Drupal\Tests

Code

protected function tearDown() : void {
  parent::tearDown();

  // Destroy the testing kernel.
  if (isset($this->kernel)) {
    $this
      ->cleanupEnvironment();
    $this->kernel
      ->shutdown();
  }

  // Ensure that internal logged in variable is reset.
  $this->loggedInUser = FALSE;
  if ($this->mink) {
    $this->mink
      ->stopSessions();
  }

  // Restore original shutdown callbacks.
  if (function_exists('drupal_register_shutdown_function')) {
    $callbacks =& drupal_register_shutdown_function();
    $callbacks = $this->originalShutdownCallbacks;
  }
}