function ThemeUiTest::testInstallModuleWithMissingDependencies

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php \Drupal\Tests\system\Functional\Theme\ThemeUiTest::testInstallModuleWithMissingDependencies()
  2. 10 core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php \Drupal\Tests\system\Functional\Theme\ThemeUiTest::testInstallModuleWithMissingDependencies()
  3. 11.x core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php \Drupal\Tests\system\Functional\Theme\ThemeUiTest::testInstallModuleWithMissingDependencies()

Tests installing a theme with missing module dependencies.

File

core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php, line 303

Class

ThemeUiTest
Tests the theme UI.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testInstallModuleWithMissingDependencies() {
    $this->drupalGet('admin/appearance');
    $theme_container = $this->getSession()
        ->getPage()
        ->find('css', 'h3:contains("Test Theme Depending on Nonexisting Module")')
        ->getParent();
    $this->assertStringContainsString('Requires: test_module_non_existing (missing)', $theme_container->getText());
    $this->assertStringContainsString('This theme requires the listed modules to operate correctly.', $theme_container->getText());
}

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