function GenerateThemeTest::setUp

Same name in this branch
  1. 11.x core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php \Drupal\BuildTests\Command\GenerateThemeTest::setUp()
Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php \Drupal\Tests\Core\Command\GenerateThemeTest::setUp()
  2. 10 core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php \Drupal\Tests\Core\Command\GenerateThemeTest::setUp()
  3. 10 core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php \Drupal\BuildTests\Command\GenerateThemeTest::setUp()

Overrides BuildTestBase::setUp

File

core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php, line 32

Class

GenerateThemeTest
Tests the generate-theme commands.

Namespace

Drupal\Tests\Core\Command

Code

protected function setUp() : void {
    $sqlite = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')
        ->fetch()[0];
    if (version_compare($sqlite, Tasks::SQLITE_MINIMUM_VERSION) < 0) {
        $this->markTestSkipped();
    }
    parent::setUp();
    $php_executable_finder = new PhpExecutableFinder();
    $this->php = $php_executable_finder->find();
    $this->copyCodebase();
    $this->executeCommand('COMPOSER_DISCARD_CHANGES=true composer install --no-dev --no-interaction');
    chdir($this->getWorkingPath());
}

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