Issue #3033494 by alexpott, dww, tim.plunkett, larowlan: SiteConfigureForm can install the file module without the field module

8.7.x
Lee Rowlands 2019-02-25 20:39:52 +10:00
parent 56606fe1fb
commit 3b32b1e600
No known key found for this signature in database
GPG Key ID: 2B829A3DF9204DC4
3 changed files with 39 additions and 1 deletions

View File

@ -292,7 +292,7 @@ class SiteConfigureForm extends ConfigFormBase {
// Enable update.module if this option was selected.
$update_status_module = $form_state->getValue('enable_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
// addresses to be notified when updates are available, if selected.

View File

@ -0,0 +1,38 @@
<?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;
}
}