Issue #3379496 by quietone, smustgrave, longwave: Convert enable/disable to install/uninstall in UI not in hook_help

merge-requests/6042/merge
Dave Long 2024-01-11 13:24:56 +00:00
parent c6eb905222
commit db74af75f8
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
24 changed files with 114 additions and 114 deletions

View File

@ -130,7 +130,7 @@ class Module extends Updater implements UpdaterInterface {
],
$default_options + [
'#url' => Url::fromRoute('system.modules_list'),
'#title' => t('Enable newly added modules'),
'#title' => t('Install newly added modules'),
],
$default_options + [
'#url' => Url::fromRoute('system.admin'),

View File

@ -132,7 +132,7 @@ class ForumUninstallTest extends BrowserTestBase {
// Double check everything by reinstalling the forum module again.
$this->drupalGet('admin/modules');
$this->submitForm(['modules[forum][enable]' => 1], 'Install');
$this->assertSession()->pageTextContains('Module Forum has been enabled.');
$this->assertSession()->pageTextContains('Module Forum has been installed.');
}
/**

View File

@ -61,7 +61,7 @@ function image_requirements($phase) {
'image.toolkit' => [
'title' => t('Image toolkit'),
'value' => t('None'),
'description' => t("No image toolkit is configured on the site. Check PHP installed extensions or add a contributed toolkit that doesn't require a PHP extension. Make sure that at least one valid image toolkit is enabled."),
'description' => t("No image toolkit is configured on the site. Check PHP installed extensions or add a contributed toolkit that doesn't require a PHP extension. Make sure that at least one valid image toolkit is installed."),
'severity' => REQUIREMENT_ERROR,
],
];

View File

@ -176,7 +176,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
// Install any module.
$this->drupalGet('admin/modules');
$this->submitForm(['modules[dblog][enable]' => 'dblog'], 'Install');
$this->assertSession()->pageTextContains('Module Database Logging has been enabled.');
$this->assertSession()->pageTextContains('Module Database Logging has been installed.');
// Get the front page and ensure that the translated configuration still
// appears.

View File

@ -43,7 +43,7 @@ class MediaInstallTest extends BrowserTestBase {
$page->checkField('modules[media][enable]');
$page->pressButton('Install');
$assert_session->pageTextNotContains('could not be moved/copied because a file by that name already exists in the destination directory');
$assert_session->pageTextContains('Module Media has been enabled');
$assert_session->pageTextContains('Module Media has been installed');
}
}

View File

@ -51,7 +51,7 @@ class OverviewForm extends MigrateUpgradeFormBase {
$info[] = $this->t('Make sure that <strong>access to the database</strong> for the old site is available from this new site.');
$info[] = $this->t('<strong>If the old site has private files</strong>, a copy of its files directory must also be accessible on the host of this new site.');
$info[] = $this->t('<strong>Enable all modules on this new site</strong> that are enabled on the old site. For example, if the old site uses the Book module, then enable the Book module on this new site so that the existing data can be imported to it.');
$info[] = $this->t('<strong>Install all modules on this new site</strong> that are enabled on the old site. For example, if the old site uses the Book module, then install the Book module on this new site so that the existing data can be imported to it.');
$info[] = $this->t('<strong>Do not add any content to the new site</strong> before upgrading. Any existing content is likely to be overwritten by the upgrade process. See <a href=":url">the upgrade preparation guide</a>.', [
':url' => 'https://www.drupal.org/docs/8/upgrade/preparing-an-upgrade#do_not_create_content',
]);

View File

@ -44,16 +44,16 @@ trait ModulesEnabledTrait {
if ($url->access($this->currentUser())) {
return $this->formatPlural(
count($modules),
'Module %name has been enabled. Configure <a href=":link">related permissions</a>.',
'@count modules have been enabled: %names. Configure <a href=":link">related permissions</a>.',
'Module %name has been installed. Configure <a href=":link">related permissions</a>.',
'@count modules have been installed: %names. Configure <a href=":link">related permissions</a>.',
$t_args + [':link' => $url->toString()]
);
}
return $this->formatPlural(
count($modules),
'Module %name has been enabled.',
'@count modules have been enabled: %names.',
'Module %name has been installed.',
'@count modules have been installed: %names.',
$t_args
);
}

View File

@ -80,7 +80,7 @@ class ModulesListConfirmForm extends ConfirmFormBase {
* {@inheritdoc}
*/
public function getQuestion() {
return $this->t('Some required modules must be enabled');
return $this->t('Some required modules must be installed');
}
/**
@ -146,7 +146,7 @@ class ModulesListConfirmForm extends ConfirmFormBase {
// Display a list of required modules that have to be installed as well
// but were not manually selected.
foreach ($this->modules['dependencies'] as $module => $dependencies) {
$items[] = $this->formatPlural(count($dependencies), 'You must enable the @required module to install @module.', 'You must enable the @required modules to install @module.', [
$items[] = $this->formatPlural(count($dependencies), 'You must install the @required module to install @module.', 'You must install the @required modules to install @module.', [
'@module' => $this->modules['install'][$module],
// It is safe to implode this because module names are not translated
// markup and so will not be double-escaped.

View File

@ -84,22 +84,22 @@ class ModulesListNonStableConfirmForm extends ModulesListConfirmForm {
$hasDeprecatedModulesToEnable = !empty($this->groupedModuleInfo[ExtensionLifecycle::DEPRECATED]);
if ($hasExperimentalModulesToEnable && $hasDeprecatedModulesToEnable) {
return $this->t('Are you sure you wish to enable experimental and deprecated modules?');
return $this->t('Are you sure you wish to install experimental and deprecated modules?');
}
if ($hasExperimentalModulesToEnable) {
return $this->formatPlural(
count($this->groupedModuleInfo[ExtensionLifecycle::EXPERIMENTAL]),
'Are you sure you wish to enable an experimental module?',
'Are you sure you wish to enable experimental modules?'
'Are you sure you wish to install an experimental module?',
'Are you sure you wish to install experimental modules?'
);
}
if ($hasDeprecatedModulesToEnable) {
return $this->formatPlural(
count($this->groupedModuleInfo[ExtensionLifecycle::DEPRECATED]),
'Are you sure you wish to enable a deprecated module?',
'Are you sure you wish to enable deprecated modules?'
'Are you sure you wish to install a deprecated module?',
'Are you sure you wish to install deprecated modules?'
);
}
}

View File

@ -113,7 +113,7 @@ class ThemeExperimentalConfirmForm extends ConfirmFormBase {
$items = [];
if (!empty($dependencies)) {
// Display a list of required themes that have to be installed as well.
$items[] = $this->formatPlural(count($dependencies), 'You must enable the @required theme to install @theme.', 'You must enable the @required themes to install @theme.', [
$items[] = $this->formatPlural(count($dependencies), 'You must install the @required theme to install @theme.', 'You must install the @required themes to install @theme.', [
'@theme' => $get_label($theme),
// It is safe to implode this because theme names are not translated
// markup and so will not be double-escaped.

View File

@ -122,7 +122,7 @@ function system_requirements($phase) {
// Warn if any experimental modules are installed.
if (!empty($experimental_modules)) {
$requirements['experimental_modules'] = [
'title' => t('Experimental modules enabled'),
'title' => t('Experimental modules installed'),
'value' => t('Experimental modules found: %module_list. <a href=":url">Experimental modules</a> are provided for testing purposes only. Use at your own risk.', ['%module_list' => implode(', ', $experimental_modules), ':url' => 'https://www.drupal.org/core/experimental']),
'severity' => REQUIREMENT_WARNING,
];
@ -133,7 +133,7 @@ function system_requirements($phase) {
$deprecated_modules_link_list[] = (string) Link::fromTextAndUrl($deprecated_module['name'], Url::fromUri($deprecated_module['lifecycle_link']))->toString();
}
$requirements['deprecated_modules'] = [
'title' => t('Deprecated modules enabled'),
'title' => t('Deprecated modules installed'),
'value' => t('Deprecated modules found: %module_list.', [
'%module_list' => Markup::create(implode(', ', $deprecated_modules_link_list)),
]),
@ -141,7 +141,7 @@ function system_requirements($phase) {
];
}
// Gather all obsolete and experimental themes being enabled.
// Gather all obsolete and experimental themes being installed.
$experimental_themes = [];
$deprecated_themes = [];
$installed_themes = \Drupal::service('theme_handler')->listInfo();
@ -168,23 +168,23 @@ function system_requirements($phase) {
}
}
// Warn if any experimental themes are enabled.
// Warn if any experimental themes are installed.
if (!empty($experimental_themes)) {
$requirements['experimental_themes'] = [
'title' => t('Experimental themes enabled'),
'title' => t('Experimental themes installed'),
'value' => t('Experimental themes found: %theme_list. Experimental themes are provided for testing purposes only. Use at your own risk.', ['%theme_list' => implode(', ', $experimental_themes)]),
'severity' => REQUIREMENT_WARNING,
];
}
// Warn if any deprecated themes are enabled.
// Warn if any deprecated themes are installed.
if (!empty($deprecated_themes)) {
foreach ($deprecated_themes as $deprecated_theme) {
$deprecated_themes_link_list[] = (string) Link::fromTextAndUrl($deprecated_theme['name'], Url::fromUri($deprecated_theme['lifecycle_link']))->toString();
}
$requirements['deprecated_themes'] = [
'title' => t('Deprecated themes enabled'),
'title' => t('Deprecated themes installed'),
'value' => t('Deprecated themes found: %theme_list.', [
'%theme_list' => Markup::create(implode(', ', $deprecated_themes_link_list)),
]),
@ -192,13 +192,13 @@ function system_requirements($phase) {
];
}
// Warn if any obsolete extensions (themes or modules) are enabled.
// Warn if any obsolete extensions (themes or modules) are installed.
if (!empty($obsolete_extensions)) {
foreach ($obsolete_extensions as $obsolete_extension) {
$obsolete_extensions_link_list[] = (string) Link::fromTextAndUrl($obsolete_extension['name'], Url::fromUri($obsolete_extension['lifecycle_link']))->toString();
}
$requirements['obsolete_extensions'] = [
'title' => t('Obsolete extensions enabled'),
'title' => t('Obsolete extensions installed'),
'value' => t('Obsolete extensions found: %extensions. Obsolete extensions are provided only so that they can be uninstalled cleanly. You should immediately <a href=":uninstall_url">uninstall these extensions</a> since they may be removed in a future release.', [
'%extensions' => Markup::create(implode(', ', $obsolete_extensions_link_list)),
':uninstall_url' => Url::fromRoute('system.modules_uninstall')->toString(),
@ -1379,7 +1379,7 @@ function system_requirements($phase) {
}
// When the database driver is provided by a module, then check that the
// providing module is enabled.
// providing module is installed.
if ($phase === 'runtime' || $phase === 'update') {
$connection = Database::getConnection();
$provider = $connection->getProvider();
@ -1390,11 +1390,11 @@ function system_requirements($phase) {
$pending_updates = $post_update_registry->getPendingUpdateInformation();
if (!in_array('enable_provider_database_driver', array_keys($pending_updates['system']['pending'] ?? []), TRUE)) {
// Only show the warning when the post update function has run and
// the module that is providing the database driver is not enabled.
// the module that is providing the database driver is not installed.
$requirements['database_driver_provided_by_module'] = [
'title' => t('Database driver provided by module'),
'value' => t('Not enabled'),
'description' => t('The current database driver is provided by the module: %module. The module is currently not enabled. You should immediately <a href=":enable">enable</a> the module.', ['%module' => $provider, ':enable' => Url::fromRoute('system.modules_list')->toString()]),
'value' => t('Not installed'),
'description' => t('The current database driver is provided by the module: %module. The module is currently not installed. You should immediately <a href=":install">install</a> the module.', ['%module' => $provider, ':install' => Url::fromRoute('system.modules_list')->toString()]),
'severity' => REQUIREMENT_ERROR,
];
}

View File

@ -288,7 +288,7 @@ system.modules_list_confirm:
path: '/admin/modules/list/confirm'
defaults:
_form: '\Drupal\system\Form\ModulesListConfirmForm'
_title: 'Some required modules must be enabled'
_title: 'Some required modules must be installed'
requirements:
_permission: 'administer modules'

View File

@ -58,7 +58,7 @@ class DrupalMessengerServiceTest extends BrowserTestBase {
$edit["modules[help][enable]"] = TRUE;
$this->drupalGet('admin/modules');
$this->submitForm($edit, 'Install');
$assert->pageTextContains('Help has been enabled');
$assert->pageTextContains('Help has been installed');
$assert->pageTextContains('system_test_preinstall_module called');
}

View File

@ -72,20 +72,20 @@ class ModulesListFormWebTest extends BrowserTestBase {
// Enable a module that does not define permissions.
$edit = ['modules[layout_discovery][enable]' => 'layout_discovery'];
$this->submitForm($edit, 'Install');
$this->assertSession()->elementTextContains('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]", 'Module Layout Discovery has been enabled.');
$this->assertSession()->elementTextContains('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]", 'Module Layout Discovery has been installed.');
$this->assertSession()->elementNotExists('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]//a");
// Enable a module that defines permissions.
$edit = ['modules[action][enable]' => 'action'];
$this->submitForm($edit, 'Install');
$this->assertSession()->elementTextContains('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]", 'Module Actions UI has been enabled.');
$this->assertSession()->elementTextContains('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]", 'Module Actions UI has been installed.');
$this->assertSession()->elementExists('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]//a[contains(@href, '/admin/people/permissions/module/action')]");
// Enable a module that has dependencies and both define permissions.
$edit = ['modules[content_moderation][enable]' => 'content_moderation'];
$this->submitForm($edit, 'Install');
$this->submitForm([], 'Continue');
$this->assertSession()->elementTextContains('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]", '2 modules have been enabled: Content Moderation, Workflows.');
$this->assertSession()->elementTextContains('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]", '2 modules have been installed: Content Moderation, Workflows.');
$this->assertSession()->elementExists('xpath', "//div[@role='contentinfo' and h2[text()='Status message']]//a[contains(@href, '/admin/people/permissions/module/content_moderation%2Cworkflows')]");
}
@ -182,7 +182,7 @@ BROKEN;
$edit = ['modules[changing_module][enable]' => 'changing_module'];
$this->drupalGet('admin/modules');
$this->submitForm($edit, 'Install');
$this->assertSession()->pageTextContains('Module Module that changes has been enabled.');
$this->assertSession()->pageTextContains('Module Module that changes has been installed.');
file_put_contents($file_path, Yaml::encode($incompatible_info));
$this->drupalGet('admin/modules');

View File

@ -45,7 +45,7 @@ class DependencyTest extends ModuleTestBase {
$edit['modules[content_translation][enable]'] = 'content_translation';
$this->drupalGet('admin/modules');
$this->submitForm($edit, 'Install');
$this->assertSession()->pageTextContains('Some required modules must be enabled');
$this->assertSession()->pageTextContains('Some required modules must be installed');
$this->assertModules(['content_translation', 'language'], FALSE);
@ -53,7 +53,7 @@ class DependencyTest extends ModuleTestBase {
$this->assertNoModuleConfig('language');
$this->submitForm([], 'Continue');
$this->assertSession()->pageTextContains('2 modules have been enabled: Content Translation, Language.');
$this->assertSession()->pageTextContains('2 modules have been installed: Content Translation, Language.');
$this->assertModules(['content_translation', 'language'], TRUE);
// Assert that the language YAML files were created.
@ -151,7 +151,7 @@ class DependencyTest extends ModuleTestBase {
$edit['modules[system_no_module_version_dependency_test][enable]'] = 'system_no_module_version_dependency_test';
$this->drupalGet('admin/modules');
$this->submitForm($edit, 'Install');
$this->assertSession()->pageTextContains('2 modules have been enabled: System no module version dependency test, System no module version test.');
$this->assertSession()->pageTextContains('2 modules have been installed: System no module version dependency test, System no module version test.');
// Ensure status report is working.
$this->drupalLogin($this->createUser(['administer site configuration']));
@ -257,7 +257,7 @@ class DependencyTest extends ModuleTestBase {
$this->assertModules(['dblog'], FALSE);
// Note that dependencies are sorted alphabetically in the confirmation
// message.
$this->assertSession()->pageTextContains('You must enable the Configuration Manager, Help modules to install Database Logging.');
$this->assertSession()->pageTextContains('You must install the Configuration Manager, Help modules to install Database Logging.');
$edit['modules[config][enable]'] = 'config';
$edit['modules[help][enable]'] = 'help';

View File

@ -47,12 +47,12 @@ class NonStableModulesTest extends BrowserTestBase {
$edit["modules[test_page_test][enable]"] = TRUE;
$this->drupalGet('admin/modules');
$this->submitForm($edit, 'Install');
$this->assertSession()->pageTextContains('Module Test page has been enabled.');
$this->assertSession()->pageTextContains('Module Test page has been installed.');
$this->assertSession()->pageTextNotContains('Experimental modules are provided for testing purposes only.');
// There should be no warning about enabling experimental or deprecated
// modules, since there's no confirmation form.
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable ');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install ');
// Uninstall the module.
\Drupal::service('module_installer')->uninstall(['test_page_test']);
@ -67,22 +67,22 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the experimental modules with only this one.
$this->assertSession()->pageTextNotContains('Experimental Test has been enabled.');
$this->assertSession()->pageTextNotContains('Experimental Test has been installed.');
$this->assertSession()->pageTextContains('Experimental modules are provided for testing purposes only.');
$this->assertSession()->pageTextContains('The following module is experimental: Experimental Test');
// There should be a warning about enabling experimental modules, but no
// warnings about deprecated modules.
$this->assertSession()->pageTextContains('Are you sure you wish to enable an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable experimental and deprecated modules?');
$this->assertSession()->pageTextContains('Are you sure you wish to install an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install experimental and deprecated modules?');
// There should be no message about enabling dependencies.
$this->assertSession()->pageTextNotContains('You must enable');
$this->assertSession()->pageTextNotContains('You must install');
// Enable the module and confirm that it worked.
$this->submitForm([], 'Continue');
$this->assertSession()->pageTextContains('Experimental Test has been enabled.');
$this->assertSession()->pageTextContains('Experimental Test has been installed.');
// Uninstall the module.
\Drupal::service('module_installer')->uninstall(['experimental_module_test']);
@ -96,26 +96,26 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the experimental modules with only this one.
$this->assertSession()->pageTextNotContains('2 modules have been enabled: Experimental Dependency Test, Experimental Test');
$this->assertSession()->pageTextNotContains('2 modules have been installed: Experimental Dependency Test, Experimental Test');
$this->assertSession()->pageTextContains('Experimental modules are provided for testing purposes only.');
$this->assertSession()->pageTextContains('The following module is experimental: Experimental Test');
// There should be a warning about enabling experimental modules, but no
// warnings about deprecated modules.
$this->assertSession()->pageTextContains('Are you sure you wish to enable an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable experimental and deprecated modules?');
$this->assertSession()->pageTextContains('Are you sure you wish to install an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install experimental and deprecated modules?');
// Ensure the non-experimental module is not listed as experimental.
$this->assertSession()->pageTextNotContains('The following modules are experimental: Experimental Test, Experimental Dependency Test');
$this->assertSession()->pageTextNotContains('The following module is experimental: Experimental Dependency Test');
// There should be a message about enabling dependencies.
$this->assertSession()->pageTextContains('You must enable the Experimental Test module to install Experimental Dependency Test');
$this->assertSession()->pageTextContains('You must install the Experimental Test module to install Experimental Dependency Test');
// Enable the module and confirm that it worked.
$this->submitForm([], 'Continue');
$this->assertSession()->pageTextContains('2 modules have been enabled: Experimental Dependency Test, Experimental Test');
$this->assertSession()->pageTextContains('2 modules have been installed: Experimental Dependency Test, Experimental Test');
// Uninstall the modules.
\Drupal::service('module_installer')->uninstall([
@ -134,26 +134,26 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the experimental modules with only this one.
$this->assertSession()->pageTextNotContains('2 modules have been enabled: Experimental Dependency Test, Experimental Test');
$this->assertSession()->pageTextNotContains('2 modules have been installed: Experimental Dependency Test, Experimental Test');
$this->assertSession()->pageTextContains('Experimental modules are provided for testing purposes only.');
$this->assertSession()->pageTextContains('The following module is experimental: Experimental Test');
// There should be a warning about enabling experimental modules, but no
// warnings about deprecated modules.
$this->assertSession()->pageTextContains('Are you sure you wish to enable an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable experimental and deprecated modules?');
$this->assertSession()->pageTextContains('Are you sure you wish to install an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install experimental and deprecated modules?');
// Ensure the non-experimental module is not listed as experimental.
$this->assertSession()->pageTextNotContains('The following modules are experimental: Experimental Dependency Test, Experimental Test');
$this->assertSession()->pageTextNotContains('The following module is experimental: Experimental Dependency Test');
// There should be no message about enabling dependencies.
$this->assertSession()->pageTextNotContains('You must enable');
$this->assertSession()->pageTextNotContains('You must install');
// Enable the module and confirm that it worked.
$this->submitForm([], 'Continue');
$this->assertSession()->pageTextContains('2 modules have been enabled: Experimental Dependency Test, Experimental Test');
$this->assertSession()->pageTextContains('2 modules have been installed: Experimental Dependency Test, Experimental Test');
// Try to enable an experimental module that can not be due to
// hook_requirements().
@ -186,7 +186,7 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the deprecated modules with only this one.
$assert = $this->assertSession();
$assert->pageTextNotContains('Deprecated module has been enabled.');
$assert->pageTextNotContains('Deprecated module has been installed.');
$assert->pageTextContains('Deprecated modules are modules that may be removed from the next major release of Drupal core. Use at your own risk.');
$assert->pageTextContains('The Deprecated module module is deprecated');
$more_information_link = $assert->elementExists('named', [
@ -197,16 +197,16 @@ class NonStableModulesTest extends BrowserTestBase {
// There should be a warning about enabling deprecated modules, but no
// warnings about experimental modules.
$this->assertSession()->pageTextContains('Are you sure you wish to enable a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable experimental and deprecated modules?');
$this->assertSession()->pageTextContains('Are you sure you wish to install a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install experimental and deprecated modules?');
// There should be no message about enabling dependencies.
$assert->pageTextNotContains('You must enable');
$assert->pageTextNotContains('You must install');
// Enable the module and confirm that it worked.
$this->submitForm([], 'Continue');
$assert->pageTextContains('Deprecated module has been enabled.');
$assert->pageTextContains('Deprecated module has been installed.');
// Uninstall the module.
\Drupal::service('module_installer')->uninstall(['deprecated_module']);
@ -220,25 +220,25 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the deprecated modules with only this one.
$assert->pageTextNotContains('2 modules have been enabled: Deprecated module dependency, Deprecated module');
$assert->pageTextNotContains('2 modules have been installed: Deprecated module dependency, Deprecated module');
$assert->pageTextContains('Deprecated modules are modules that may be removed from the next major release of Drupal core. Use at your own risk.');
$assert->pageTextContains('The Deprecated module module is deprecated');
// There should be a warning about enabling deprecated modules, but no
// warnings about experimental modules.
$this->assertSession()->pageTextContains('Are you sure you wish to enable a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable experimental and deprecated modules?');
$this->assertSession()->pageTextContains('Are you sure you wish to install a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install experimental and deprecated modules?');
// Ensure the non-deprecated module is not listed as deprecated.
$assert->pageTextNotContains('The Deprecated module dependency module is deprecated');
// There should be a message about enabling dependencies.
$assert->pageTextContains('You must enable the Deprecated module module to install Deprecated module dependency');
$assert->pageTextContains('You must install the Deprecated module module to install Deprecated module dependency');
// Enable the module and confirm that it worked.
$this->submitForm([], 'Continue');
$assert->pageTextContains('2 modules have been enabled: Deprecated module dependency, Deprecated module');
$assert->pageTextContains('2 modules have been installed: Deprecated module dependency, Deprecated module');
// Uninstall the modules.
\Drupal::service('module_installer')->uninstall([
@ -254,7 +254,7 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the deprecated modules with only this one.
$assert->pageTextNotContains('2 modules have been enabled: Deprecated module with non deprecated dependency, Drupal system listing compatible test');
$assert->pageTextNotContains('2 modules have been installed: Deprecated module with non deprecated dependency, Drupal system listing compatible test');
$assert->pageTextContains('Deprecated modules are modules that may be removed from the next major release of Drupal core. Use at your own risk.');
$assert->pageTextContains('The Deprecated module with non deprecated dependency module is deprecated');
$more_information_link = $assert->elementExists('named', [
@ -265,19 +265,19 @@ class NonStableModulesTest extends BrowserTestBase {
// There should be a warning about enabling deprecated modules, but no
// warnings about experimental modules.
$this->assertSession()->pageTextContains('Are you sure you wish to enable a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable experimental and deprecated modules?');
$this->assertSession()->pageTextContains('Are you sure you wish to install a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install experimental and deprecated modules?');
// Ensure the non-deprecated dependency module is not listed as deprecated.
$assert->pageTextNotContains('The Drupal system listing compatible test module is deprecated');
// There should be a message about enabling dependencies.
$assert->pageTextContains('You must enable the Drupal system listing compatible test module to install Deprecated module with non deprecated dependency.');
$assert->pageTextContains('You must install the Drupal system listing compatible test module to install Deprecated module with non deprecated dependency.');
// Enable the module and confirm that it worked.
$this->submitForm([], 'Continue');
$assert->pageTextContains('2 modules have been enabled: Deprecated module with non deprecated dependency, Drupal system listing compatible test.');
$assert->pageTextContains('2 modules have been installed: Deprecated module with non deprecated dependency, Drupal system listing compatible test.');
// Uninstall the modules.
\Drupal::service('module_installer')->uninstall([
@ -296,25 +296,25 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the deprecated modules with only this one.
$assert->pageTextNotContains('2 modules have been enabled: Deprecated module dependency, Deprecated module');
$assert->pageTextNotContains('2 modules have been installed: Deprecated module dependency, Deprecated module');
$assert->pageTextContains('Deprecated modules are modules that may be removed from the next major release of Drupal core. Use at your own risk.');
$assert->pageTextContains('The Deprecated module module is deprecated');
// There should be a warning about enabling deprecated modules, but no
// warnings about experimental modules.
$this->assertSession()->pageTextContains('Are you sure you wish to enable a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable experimental and deprecated modules?');
$this->assertSession()->pageTextContains('Are you sure you wish to install a deprecated module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install an experimental module?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install experimental and deprecated modules?');
// Ensure the non-deprecated module is not listed as deprecated.
$assert->pageTextNotContains('The Deprecated module dependency module is deprecated');
// There should be no message about enabling dependencies.
$assert->pageTextNotContains('You must enable');
$assert->pageTextNotContains('You must install');
// Enable the modules and confirm that it worked.
$this->submitForm([], 'Continue');
$assert->pageTextContains('2 modules have been enabled: Deprecated module, Deprecated module dependency');
$assert->pageTextContains('2 modules have been installed: Deprecated module, Deprecated module dependency');
\Drupal::service('module_installer')->uninstall([
'deprecated_module',
@ -327,7 +327,7 @@ class NonStableModulesTest extends BrowserTestBase {
// 'deprecated_module_contrib' to something other than 'core'.
$this->drupalGet('admin/modules');
$this->submitForm(["modules[deprecated_module_test][enable]" => TRUE], 'Install');
$assert->pageTextContains('Module Deprecated module test has been enabled.');
$assert->pageTextContains('Module Deprecated module test has been installed.');
// Test installing a non-core deprecated module. There should be a
// confirmation form with a deprecated warning for a 'project' and not for
@ -362,7 +362,7 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the deprecated modules with only this one.
$assert = $this->assertSession();
$assert->pageTextNotContains('Deprecated module has been enabled.');
$assert->pageTextNotContains('Deprecated module has been installed.');
$assert->pageTextContains('Deprecated modules are modules that may be removed from the next major release of Drupal core. Use at your own risk.');
$assert->pageTextContains('The Deprecated module module is deprecated');
$more_information_link = $assert->elementExists('named', [
@ -373,23 +373,23 @@ class NonStableModulesTest extends BrowserTestBase {
// The module should not be enabled and there should be a warning and a
// list of the experimental modules with only this one.
$assert->pageTextNotContains('Experimental Test has been enabled.');
$assert->pageTextNotContains('Experimental Test has been installed.');
$assert->pageTextContains('Experimental modules are provided for testing purposes only.');
$assert->pageTextContains('The following module is experimental: Experimental Test');
// There should be a warning about enabling experimental and deprecated
// modules, but no warnings about solitary experimental or deprecated
// modules.
$this->assertSession()->pageTextContains('Are you sure you wish to enable experimental and deprecated modules?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable experimental modules?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to enable deprecated modules?');
$this->assertSession()->pageTextContains('Are you sure you wish to install experimental and deprecated modules?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install experimental modules?');
$this->assertSession()->pageTextNotContains('Are you sure you wish to install deprecated modules?');
// There should be no message about enabling dependencies.
$assert->pageTextNotContains('You must enable');
$assert->pageTextNotContains('You must install');
// Enable the module and confirm that it worked.
$this->submitForm([], 'Continue');
$assert->pageTextContains('2 modules have been enabled: Deprecated module, Experimental Test.');
$assert->pageTextContains('2 modules have been installed: Deprecated module, Experimental Test.');
}
}

View File

@ -69,10 +69,10 @@ class DatabaseDriverProvidedByModuleTest extends BrowserTestBase {
$this->drupalGet('admin/reports/status');
$this->assertSession()->statusCodeEquals(200);
// The module driver_test is not enabled and is providing to current
// The module driver_test is not installed and is providing to current
// database driver. Check that the correct error is shown.
$this->assertSession()->pageTextContains('Database driver provided by module');
$this->assertSession()->pageTextContains('The current database driver is provided by the module: driver_test. The module is currently not enabled. You should immediately enable the module.');
$this->assertSession()->pageTextContains('The current database driver is provided by the module: driver_test. The module is currently not installed. You should immediately install the module.');
}
}

View File

@ -76,9 +76,9 @@ class MainContentFallbackTest extends BrowserTestBase {
$edit['modules[block][enable]'] = 'block';
$this->drupalGet('admin/modules');
$this->submitForm($edit, 'Install');
$this->assertSession()->pageTextContains('Module Block has been enabled.');
$this->assertSession()->pageTextContains('Module Block has been installed.');
$this->rebuildContainer();
$this->assertTrue(\Drupal::moduleHandler()->moduleExists('block'), 'Block module re-enabled.');
$this->assertTrue(\Drupal::moduleHandler()->moduleExists('block'), 'Block module re-installed.');
}
}

View File

@ -126,7 +126,7 @@ class StatusTest extends BrowserTestBase {
$this->drupalGet('admin/reports/status');
// Confirm warning messages are displayed for the deprecated module.
$session->pageTextContains('Deprecated modules enabled');
$session->pageTextContains('Deprecated modules installed');
$session->pageTextContains('Deprecated modules found: Deprecated module.');
// Check that the deprecated module link was rendered correctly.
@ -135,12 +135,12 @@ class StatusTest extends BrowserTestBase {
// Uninstall a deprecated module and confirm the warning is not displayed.
$module_installer->uninstall(['deprecated_module']);
$this->drupalGet('admin/reports/status');
$session->pageTextNotContains('Deprecated modules enabled');
$session->pageTextNotContains('Deprecated modules installed');
$session->pageTextNotContains('Deprecated modules found: Deprecated module.');
$this->assertSession()->elementNotExists('xpath', "//a[contains(@href, 'http://example.com/deprecated')]");
// Make sure there are no warnings about obsolete modules.
$session->pageTextNotContains('Obsolete extensions enabled');
$session->pageTextNotContains('Obsolete extensions installed');
$session->pageTextNotContains('Obsolete extensions found: System obsolete status test.');
// Install an obsolete module. Normally this isn't possible, so write to
@ -148,7 +148,7 @@ class StatusTest extends BrowserTestBase {
$this->config('core.extension')->set('module.system_status_obsolete_test', 0)->save();
$this->rebuildAll();
$this->drupalGet('admin/reports/status');
$session->pageTextContains('Obsolete extensions enabled');
$session->pageTextContains('Obsolete extensions installed');
$session->pageTextContains('Obsolete extensions found: System obsolete status test.');
$session->pageTextContains('Obsolete extensions are provided only so that they can be uninstalled cleanly. You should immediately uninstall these extensions since they may be removed in a future release.');
$this->assertSession()->elementExists('xpath', "//a[contains(@href, '/admin/modules/uninstall')]");
@ -156,7 +156,7 @@ class StatusTest extends BrowserTestBase {
// Make sure the warning is gone after uninstalling the module.
$module_installer->uninstall(['system_status_obsolete_test']);
$this->drupalGet('admin/reports/status');
$session->pageTextNotContains('Obsolete extensions enabled');
$session->pageTextNotContains('Obsolete extensions installed');
$session->pageTextNotContains('Obsolete extensions found: System obsolete status test.');
$session->pageTextNotContains('Obsolete extensions are provided only so that they can be uninstalled cleanly. You should immediately uninstall these extensions since they may be removed in a future release.');
@ -164,7 +164,7 @@ class StatusTest extends BrowserTestBase {
$theme_installer = \Drupal::service('theme_installer');
$theme_installer->install(['test_deprecated_theme']);
$this->drupalGet('admin/reports/status');
$session->pageTextContains('Deprecated themes enabled');
$session->pageTextContains('Deprecated themes installed');
$session->pageTextContains('Deprecated themes found: Test deprecated theme.');
// Check that the deprecated theme link was rendered correctly.
@ -173,7 +173,7 @@ class StatusTest extends BrowserTestBase {
// Uninstall a deprecated theme and confirm the warning is not displayed.
$theme_installer->uninstall(['test_deprecated_theme']);
$this->drupalGet('admin/reports/status');
$session->pageTextNotContains('Deprecated themes enabled');
$session->pageTextNotContains('Deprecated themes installed');
$session->pageTextNotContains('Deprecated themes found: Test deprecated theme.');
$this->assertSession()->elementNotExists('xpath', "//a[contains(@href, 'http://example.com/deprecated_theme')]");

View File

@ -104,7 +104,7 @@ class ExperimentalThemeTest extends BrowserTestBase {
$this->assertSession()->pageTextNotContains('The following themes are experimental: Experimental dependency test');
// There should be a message about enabling dependencies.
$this->assertSession()->pageTextContains('You must enable the Experimental test theme to install Experimental dependency test');
$this->assertSession()->pageTextContains('You must install the Experimental test theme to install Experimental dependency test');
// Enable the theme and confirm that it worked.
$this->submitForm([], 'Continue');

View File

@ -92,7 +92,7 @@ class ThemeUiTest extends BrowserTestBase {
$this->drupalGet('admin/appearance');
$assert_module_enabled_message = function ($enabled_modules) {
$count = count($enabled_modules);
$module_enabled_text = $count === 1 ? "{$this->testModules[$enabled_modules[0]]} has been enabled." : $count . " modules have been enabled:";
$module_enabled_text = $count === 1 ? "{$this->testModules[$enabled_modules[0]]} has been installed." : $count . " modules have been installed:";
$this->assertSession()->pageTextContains($module_enabled_text);
};
// All the modules should be listed as disabled.

View File

@ -191,7 +191,7 @@ abstract class UpdateTestBase extends BrowserTestBase {
$this->assertUpdateTableTextContains('Revoked!');
$this->assertUpdateTableTextContains($revoked_version);
$this->assertUpdateTableElementContains('error.svg');
$this->assertUpdateTableTextContains('Release revoked: Your currently installed release has been revoked, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!');
$this->assertUpdateTableTextContains('Release revoked: Your currently installed release has been revoked, and is no longer available for download. Uninstalling everything included in this release or upgrading is strongly recommended!');
$this->assertVersionUpdateLinks($new_version_label, $newer_version);
}
@ -213,7 +213,7 @@ abstract class UpdateTestBase extends BrowserTestBase {
$this->assertUpdateTableTextContains('Not supported!');
$this->assertUpdateTableTextContains($unsupported_version);
$this->assertUpdateTableElementContains('error.svg');
$this->assertUpdateTableTextContains('Release not supported: Your currently installed release is now unsupported, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!');
$this->assertUpdateTableTextContains('Release not supported: Your currently installed release is now unsupported, and is no longer available for download. Uninstalling everything included in this release or upgrading is strongly recommended!');
$this->assertVersionUpdateLinks($new_version_label, $newer_version);
}

View File

@ -100,7 +100,7 @@ class UpdateUploadTest extends UpdateUploaderTestBase {
// core/authorize.php.
$this->assertSession()->linkExists('Add another module');
$this->assertSession()->linkByHrefExists(Url::fromRoute('update.module_install')->toString());
$this->assertSession()->linkExists('Enable newly added modules');
$this->assertSession()->linkExists('Install newly added modules');
$this->assertSession()->linkByHrefExists(Url::fromRoute('system.modules_list')->toString());
$this->assertSession()->linkExists('Administration pages');
$this->assertSession()->linkByHrefExists(Url::fromRoute('system.admin')->toString());

View File

@ -223,7 +223,7 @@ function update_calculate_project_update_status(&$project_data, $available) {
}
$project_data['extra'][] = [
'label' => t('Project not secure'),
'data' => t('This project has been labeled insecure by the Drupal security team, and is no longer available for download. Immediately disabling everything included by this project is strongly recommended!'),
'data' => t('This project has been labeled insecure by the Drupal security team, and is no longer available for download. Immediately uninstalling everything included by this project is strongly recommended!'),
];
break;
@ -235,7 +235,7 @@ function update_calculate_project_update_status(&$project_data, $available) {
}
$project_data['extra'][] = [
'label' => t('Project revoked'),
'data' => t('This project has been revoked, and is no longer available for download. Disabling everything included by this project is strongly recommended!'),
'data' => t('This project has been revoked, and is no longer available for download. Uninstalling everything included by this project is strongly recommended!'),
];
break;
@ -246,7 +246,7 @@ function update_calculate_project_update_status(&$project_data, $available) {
}
$project_data['extra'][] = [
'label' => t('Project not supported'),
'data' => t('This project is no longer supported, and is no longer available for download. Disabling everything included by this project is strongly recommended!'),
'data' => t('This project is no longer supported, and is no longer available for download. Uninstalling everything included by this project is strongly recommended!'),
];
break;
@ -387,7 +387,7 @@ function update_calculate_project_update_status(&$project_data, $available) {
$project_data['extra'][] = [
'class' => ['release-revoked'],
'label' => t('Release revoked'),
'data' => t('Your currently installed release has been revoked, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!'),
'data' => t('Your currently installed release has been revoked, and is no longer available for download. Uninstalling everything included in this release or upgrading is strongly recommended!'),
];
}
elseif ($release->isUnsupported()) {
@ -398,7 +398,7 @@ function update_calculate_project_update_status(&$project_data, $available) {
$project_data['extra'][] = [
'class' => ['release-not-supported'],
'label' => t('Release not supported'),
'data' => t('Your currently installed release is now unsupported, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!'),
'data' => t('Your currently installed release is now unsupported, and is no longer available for download. Uninstalling everything included in this release or upgrading is strongly recommended!'),
];
}
}