function DependencyTest::testMissingModules
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testMissingModules()
- 10 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testMissingModules()
- 11.x 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 62
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->assertRaw(t('@module (<span class="admin-missing">missing</span>)', [
'@module' => Unicode::ucfirst('_missing_dependency'),
]), 'A module with missing dependencies is marked as such.');
$checkbox = $this->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="modules[system_dependencies_test][enable]"]');
$this->assertCount(1, $checkbox, 'Checkbox for the module is disabled.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.