public function ModulesListFormWebTest::testRequiredByThemeMessage in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php \Drupal\Tests\system\Functional\Form\ModulesListFormWebTest::testRequiredByThemeMessage()
- 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 127
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)');
}