Commit 421b4765 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2620442 by Lendude: Theme logo upload settings are shown even if the...

Issue #2620442 by Lendude: Theme logo upload settings are shown even if the file module is not installed
parent d04a6a84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ class ColorTest extends WebTestBase {
   *
   * @var array
   */
  public static $modules = array('color', 'color_test', 'block');
  public static $modules = array('color', 'color_test', 'block', 'file');

  /**
   * A user with administrative permissions.
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $theme =
    }

    // Logo settings, only available when file.module is enabled.
    if ((!$theme) || in_array('logo', $features) && $this->moduleHandler->moduleExists('file')) {
    if ((!$theme || in_array('logo', $features)) && $this->moduleHandler->moduleExists('file')) {
      $form['logo'] = array(
        '#type' => 'details',
        '#title' => t('Logo image settings'),
+7 −0
Original line number Diff line number Diff line
@@ -222,6 +222,13 @@ function testThemeSettingsLogo() {
    $this->drupalPostForm('admin/appearance/settings/bartik', $edit, t('Save configuration'));
    $this->assertFieldByName('default_logo', FALSE);
    $this->assertFieldByName('logo_path', 'core/misc/druplicon.png');

    // Make sure the logo and favicon settings are not available when the file
    // module is not enabled.
    \Drupal::service('module_installer')->uninstall(['file']);
    $this->drupalGet('admin/appearance/settings');
    $this->assertNoText('Logo image settings');
    $this->assertNoText('Shortcut icon settings');
  }

  /**