You are here

protected function InstallTestTrait::themeInstall in Automatic Updates 8

Helper method that uses Drupal's theme page to install a theme.

File

tests/src/Traits/InstallTestTrait.php, line 33

Class

InstallTestTrait
Provides common functionality for automatic update test classes.

Namespace

Drupal\Tests\automatic_updates\Traits

Code

protected function themeInstall($theme_name) {
  $this
    ->moduleInstall('test_automatic_updates');
  $assert = $this
    ->visit("/admin/appearance/default?theme={$theme_name}")
    ->assertSession();
  $assert
    ->pageTextNotContains('theme was not found');
  $assert
    ->statusCodeEquals(200);
}