protected function MemoryStorageTest::tearDown

Deletes created files, database tables, and reverts all environment changes.

This method needs to be invoked for both unit and integration tests.

Overrides TestBase::tearDown

See also

TestBase::prepareDatabasePrefix()

TestBase::changeDatabasePrefix()

TestBase::prepareEnvironment()

File

drupal/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/MemoryStorageTest.php, line 41
Contains Drupal\system\Tests\KeyValueStore\MemoryStorageTest.

Class

MemoryStorageTest
Tests the key-value memory storage.

Namespace

Drupal\system\Tests\KeyValueStore

Code

protected function tearDown() {
  global $conf;
  if (isset($this->originalKeyValue)) {
    $conf['keyvalue_default'] = $this->originalKeyValue;
  }
  else {
    unset($conf['keyvalue_default']);
  }
  parent::tearDown();
}