function PerformanceTestBase::prepareEnvironment

Same name in other branches
  1. 10 core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php \Drupal\FunctionalJavascriptTests\PerformanceTestBase::prepareEnvironment()

Overrides FunctionalTestSetupTrait::prepareEnvironment

File

core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php, line 35

Class

PerformanceTestBase
Collects performance metrics.

Namespace

Drupal\FunctionalJavascriptTests

Code

protected function prepareEnvironment() {
    parent::prepareEnvironment();
    $db = Database::getConnection();
    $test_file_name = (new \ReflectionClass($this))->getFileName();
    $is_core_test = str_starts_with($test_file_name, DRUPAL_ROOT . DIRECTORY_SEPARATOR . 'core');
    if ($db->databaseType() !== 'mysql' && $is_core_test) {
        $this->markTestSkipped('Drupal core performance tests only run on MySQL');
    }
}

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