Commit 8aee2406 authored by catch's avatar catch
Browse files

Issue #3291877 by alexpott, longwave: Fix...

Issue #3291877 by alexpott, longwave: Fix \Drupal\FunctionalTests\Installer\InstallerTestBase tests to not test drupal.org

(cherry picked from commit 740a7a80)
parent b892a3da
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -760,6 +760,9 @@ public function testCronRun() {
  public function testInstall() {
    $htaccess_filename = $this->tempFilesDirectory . '/.htaccess';
    $this->assertFileExists($htaccess_filename);

    // Ensure the update module is not installed.
    $this->assertFalse(\Drupal::moduleHandler()->moduleExists('update'), 'The Update module is not installed.');
  }

  /**
+2 −1
Original line number Diff line number Diff line
@@ -105,7 +105,8 @@ protected function installParameters() {
    // existing configuration.
    unset($parameters['forms']['install_configure_form']['site_name']);
    unset($parameters['forms']['install_configure_form']['site_mail']);
    unset($parameters['forms']['install_configure_form']['update_status_module']);
    unset($parameters['forms']['install_configure_form']['enable_update_status_module']);
    unset($parameters['forms']['install_configure_form']['enable_update_status_emails']);

    return $parameters;
  }
+3 −0
Original line number Diff line number Diff line
@@ -131,6 +131,9 @@ public function testInstalled() {
    $module = $database->getProvider();
    $module_handler = \Drupal::service('module_handler');

    // Ensure the update module is not installed.
    $this->assertFalse($module_handler->moduleExists('update'), 'The Update module is not installed.');

    // Assert that the module that is providing the database driver has been
    // installed.
    $this->assertTrue($module_handler->moduleExists($module));
+13 −0
Original line number Diff line number Diff line
@@ -73,6 +73,19 @@ abstract class InstallerTestBase extends BrowserTestBase {
   */
  protected $isInstalled = FALSE;

  /**
   * {@inheritdoc}
   */
  protected function installParameters() {
    $params = parent::installParameters();
    // Set the checkbox values to FALSE so that
    // \Drupal\Tests\BrowserTestBase::translatePostValues() does not remove
    // them.
    $params['forms']['install_configure_form']['enable_update_status_module'] = FALSE;
    $params['forms']['install_configure_form']['enable_update_status_emails'] = FALSE;
    return $params;
  }

  /**
   * {@inheritdoc}
   */