You are here

protected function ShutdownFunctionsTest::tearDown in Drupal 10

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

Overrides BrowserTestBase::tearDown

File

core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php, line 26

Class

ShutdownFunctionsTest
Functional tests shutdown functions.

Namespace

Drupal\Tests\system\Functional\System

Code

protected function tearDown() : void {

  // This test intentionally throws an exception in a PHP shutdown function.
  // Prevent it from being interpreted as an actual test failure.
  // Not using File API; a potential error must trigger a PHP warning.
  unlink(\Drupal::root() . '/' . $this->siteDirectory . '/error.log');
  parent::tearDown();
}