You are here

protected function ShutdownFunctionsTest::tearDown in Zircon Profile 8

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

Cleans up after testing.

Deletes created files and temporary files directory, deletes the tables created by setUp(), and resets the database prefix.

Overrides WebTestBase::tearDown

File

core/modules/system/src/Tests/System/ShutdownFunctionsTest.php, line 26
Contains \Drupal\system\Tests\System\ShutdownFunctionsTest.

Class

ShutdownFunctionsTest
Functional tests shutdown functions.

Namespace

Drupal\system\Tests\System

Code

protected function tearDown() {

  // 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();
}