Commit 5d2bc249 authored by larowlan's avatar larowlan

Issue #3033494 by alexpott, dww, tim.plunkett: SiteConfigureForm can install...

Issue #3033494 by alexpott, dww, tim.plunkett: SiteConfigureForm can install the file module without the field module
parent 4bb82a8e
...@@ -292,7 +292,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { ...@@ -292,7 +292,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
// Enable update.module if this option was selected. // Enable update.module if this option was selected.
$update_status_module = $form_state->getValue('enable_update_status_module'); $update_status_module = $form_state->getValue('enable_update_status_module');
if (empty($install_state['config_install_path']) && $update_status_module) { if (empty($install_state['config_install_path']) && $update_status_module) {
$this->moduleInstaller->install(['file', 'update'], FALSE); $this->moduleInstaller->install(['update']);
// Add the site maintenance account's email address to the list of // Add the site maintenance account's email address to the list of
// addresses to be notified when updates are available, if selected. // addresses to be notified when updates are available, if selected.
......
<?php
namespace Drupal\FunctionalTests\Installer;
use Drupal\Tests\BrowserTestBase;
/**
* Tests installing the Testing profile with update notifications on.
*
* @group Installer
*/
class TestingProfileInstallTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected $profile = 'testing';
/**
* Ensure the Update module and its dependencies are installed.
*/
public function testUpdateModuleInstall() {
$this->assertTrue(
\Drupal::moduleHandler()->moduleExists('update') && \Drupal::moduleHandler()->moduleExists('file') && \Drupal::moduleHandler()->moduleExists('field'),
'The Update module and its dependencies are installed.'
);
}
/**
* {@inheritdoc}
*/
protected function installParameters() {
$params = parent::installParameters();
$params['forms']['install_configure_form']['enable_update_status_module'] = TRUE;
return $params;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment