public function DependencyTest::testMissingModules in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testMissingModules()
- 9 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testMissingModules()
Attempts to enable a module with a missing dependency.
File
- core/
modules/ system/ tests/ src/ Functional/ Module/ DependencyTest.php, line 66
Class
- DependencyTest
- Enable module without dependency enabled.
Namespace
Drupal\Tests\system\Functional\ModuleCode
public function testMissingModules() {
// Test that the system_dependencies_test module is marked
// as missing a dependency.
$this
->drupalGet('admin/modules');
$this
->assertSession()
->pageTextContains(Unicode::ucfirst('_missing_dependency') . ' (missing)');
$this
->assertSession()
->elementTextEquals('xpath', '//tr[@data-drupal-selector="edit-modules-system-dependencies-test"]//span[@class="admin-missing"]', 'missing');
$this
->assertSession()
->checkboxNotChecked('modules[system_dependencies_test][enable]');
}