function InstallerIsolationLevelNoDatabaseSettingsTest::prepareEnvironment

Same name and namespace in other branches
  1. 11.x core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php \Drupal\Tests\mysql\Functional\InstallerIsolationLevelNoDatabaseSettingsTest::prepareEnvironment()

Prepares the current environment for running the test.

Also sets up new resources for the testing environment, such as the public filesystem and configuration directories.

Overrides FunctionalTestSetupTrait::prepareEnvironment

File

core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php, line 25

Class

InstallerIsolationLevelNoDatabaseSettingsTest
Tests the isolation_level setting with no database settings.

Namespace

Drupal\Tests\mysql\Functional

Code

protected function prepareEnvironment() {
  parent::prepareEnvironment();
  // The isolation_level option is only available for MySQL.
  $connection_info = Database::getConnectionInfo();
  if ($connection_info['default']['driver'] !== 'mysql') {
    $this->markTestSkipped("This test does not support the {$connection_info['default']['driver']} database driver.");
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.