You are here

private function ThemeTest::assertThemeIncompatibleText in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/System/ThemeTest.php \Drupal\Tests\system\Functional\System\ThemeTest::assertThemeIncompatibleText()

Asserts that expected incompatibility text is displayed for a theme.

Parameters

string $theme_name: Theme name to select element on page. This can be a partial name.

string $expected_text: The expected incompatibility text.

1 call to ThemeTest::assertThemeIncompatibleText()
ThemeTest::testInvalidTheme in core/modules/system/tests/src/Functional/System/ThemeTest.php
Tests themes can't be installed when the base theme or engine is missing.

File

core/modules/system/tests/src/Functional/System/ThemeTest.php, line 512

Class

ThemeTest
Tests the theme interface functionality by enabling and switching themes, and using an administration theme.

Namespace

Drupal\Tests\system\Functional\System

Code

private function assertThemeIncompatibleText($theme_name, $expected_text) {
  $this
    ->assertSession()
    ->elementExists('css', ".theme-info:contains(\"{$theme_name}\") .incompatible:contains(\"{$expected_text}\")");
}