function ModuleInstallerTest::testDeprecatedInstall
Tests trying to install a deprecated module.
@covers ::install
      
    
@group legacy
File
- 
              core/tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleInstallerTest.php, line 156 
Class
- ModuleInstallerTest
- Tests the ModuleInstaller class.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public function testDeprecatedInstall() {
  $this->expectDeprecation("The module 'deprecated_module' is deprecated. See http://example.com/deprecated");
  \Drupal::service('module_installer')->install([
    'deprecated_module',
  ]);
  $this->assertTrue(\Drupal::service('module_handler')->moduleExists('deprecated_module'));
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
