public function ModuleInstallerTest::testObsoleteInstall in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php \Drupal\KernelTests\Core\Extension\ModuleInstallerTest::testObsoleteInstall()
Tests trying to install an obsolete module.
@covers ::install
File
- core/
tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleInstallerTest.php, line 143
Class
- ModuleInstallerTest
- Tests the ModuleInstaller class.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public function testObsoleteInstall() {
$this
->expectException(ObsoleteExtensionException::class);
$this
->expectExceptionMessage("Unable to install modules: module 'system_status_obsolete_test' is obsolete.");
$this->container
->get('module_installer')
->install([
'system_status_obsolete_test',
]);
}