Commit 421b4765 authored by alexpott's avatar alexpott

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
......@@ -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.
......
......@@ -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'),
......
......@@ -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');
}
/**
......
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