function DependencyTest::testMissingModules
Attempts to enable a module with a missing dependency.
File
- 
              core/
modules/ system/ tests/ src/ Functional/ Module/ DependencyTest.php, line 69  
Class
- DependencyTest
 - Enable module without dependency enabled.
 
Namespace
Drupal\Tests\system\Functional\ModuleCode
public function testMissingModules() : void {
  // 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]');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.