From 50ca110791f081b1832d94c3d71567431d902f4c Mon Sep 17 00:00:00 2001 From: effulgentsia Date: Wed, 2 Mar 2016 15:17:20 -0800 Subject: [PATCH] =?UTF-8?q?Issue=20#2678770=20by=20alexpott,=20tstoeckler,?= =?UTF-8?q?=20G=C3=A1bor=20Hojtsy:=20Random=20fail=20with=20third=20party?= =?UTF-8?q?=20shortcut=20settings=20schema=20on=20seven=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/modules/shortcut/shortcut.install | 2 +- .../Kernel/ShortcutSevenIntegrationTest.php | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php diff --git a/core/modules/shortcut/shortcut.install b/core/modules/shortcut/shortcut.install index 73986b817829..8df408fe9145 100644 --- a/core/modules/shortcut/shortcut.install +++ b/core/modules/shortcut/shortcut.install @@ -64,6 +64,6 @@ function shortcut_uninstall() { // Theme settings are not configuration entities and cannot depend on modules // so to unset a module-specific setting, we need to unset it with logic. if (\Drupal::service('theme_handler')->themeExists('seven')) { - \Drupal::configFactory()->getEditable('seven.settings')->clear('third_party_settings.shortcut.module_link')->save(TRUE); + \Drupal::configFactory()->getEditable('seven.settings')->clear('third_party_settings.shortcut')->save(TRUE); } } diff --git a/core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php b/core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php new file mode 100644 index 000000000000..f027427a85e5 --- /dev/null +++ b/core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php @@ -0,0 +1,36 @@ +install(['seven']); + $this->assertNull($this->config('seven.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in seven.settings.'); + + \Drupal::service('module_installer')->install(['shortcut']); + $this->assertTrue($this->config('seven.settings')->get('third_party_settings.shortcut.module_link'), 'The shortcut module_link setting is in seven.settings.'); + + \Drupal::service('module_installer')->uninstall(['shortcut']); + $this->assertNull($this->config('seven.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in seven.settings.'); + } + +}