public function ModulesListFormWebTest::testRequiredByThemeMessage in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php \Drupal\Tests\system\Functional\Form\ModulesListFormWebTest::testRequiredByThemeMessage()
Confirm that module 'Required By' descriptions include dependent themes.
File
- core/
modules/ system/ tests/ src/ Functional/ Form/ ModulesListFormWebTest.php, line 79
Class
Namespace
Drupal\Tests\system\Functional\FormCode
public function testRequiredByThemeMessage() {
$this
->drupalGet('admin/modules');
$module_theme_depends_on_description = $this
->getSession()
->getPage()
->findAll('css', '#edit-modules-test-module-required-by-theme-enable-description .admin-requirements li:contains("Test Theme Depending on Modules (theme) (disabled)")');
// Confirm that 'Test Theme Depending on Modules' is listed as being
// required by the module 'Test Module Required by Theme'.
$this
->assertCount(1, $module_theme_depends_on_description);
// Confirm that the required by message does not appear anywhere else.
$this
->assertSession()
->pageTextContains('Test Theme Depending on Modules (Theme) (Disabled)');
}