function TemplateProjectTestBase::setUp

Overrides BuildTestBase::setUp

File

core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php, line 68

Class

TemplateProjectTestBase
Base class for tests which create a test site from a core project template.

Namespace

Drupal\Tests\package_manager\Build

Code

protected function setUp() : void {
    // Build tests cannot be run if SQLite minimum version is not met.
    $minimum_version = Tasks::SQLITE_MINIMUM_VERSION;
    $actual_version = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')
        ->fetch()[0];
    if (version_compare($actual_version, $minimum_version, '<')) {
        $this->markTestSkipped("SQLite version {$minimum_version} or later is required, but {$actual_version} was detected.");
    }
    parent::setUp();
}

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