function ModuleInstallerTest::testInvalidCoreInstall
Tests install with a module with an invalid core version constraint.
@dataProvider providerTestInvalidCoreInstall
@covers ::install
      
    
File
- 
              core/tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleInstallerTest.php, line 96 
Class
- ModuleInstallerTest
- Tests the ModuleInstaller class.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public function testInvalidCoreInstall($module_name, $install_dependencies) {
  $this->expectException(MissingDependencyException::class);
  $this->expectExceptionMessage("Unable to install modules: module '{$module_name}' is incompatible with this version of Drupal core.");
  $this->container
    ->get('module_installer')
    ->install([
    $module_name,
  ], $install_dependencies);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
