Skip to content
Snippets Groups Projects
Unverified Commit 02656d5d authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3281440 by _shY, nod_: Update Shortcut tests to not use Bartik and Seven

parent 1bb8f3b3
No related branches found
No related tags found
No related merge requests found
...@@ -148,8 +148,8 @@ public function testShortcutLinkAdd() { ...@@ -148,8 +148,8 @@ public function testShortcutLinkAdd() {
* Tests that the "add to shortcut" and "remove from shortcut" links work. * Tests that the "add to shortcut" and "remove from shortcut" links work.
*/ */
public function testShortcutQuickLink() { public function testShortcutQuickLink() {
\Drupal::service('theme_installer')->install(['seven']); \Drupal::service('theme_installer')->install(['claro']);
$this->config('system.theme')->set('admin', 'seven')->save(); $this->config('system.theme')->set('admin', 'claro')->save();
$this->config('node.settings')->set('use_admin_theme', '1')->save(); $this->config('node.settings')->set('use_admin_theme', '1')->save();
$this->container->get('router.builder')->rebuild(); $this->container->get('router.builder')->rebuild();
...@@ -197,7 +197,7 @@ public function testShortcutQuickLink() { ...@@ -197,7 +197,7 @@ public function testShortcutQuickLink() {
$this->clickLink('Add to Default shortcuts'); $this->clickLink('Add to Default shortcuts');
$this->assertSession()->pageTextContains('Added a shortcut for Create Article.'); $this->assertSession()->pageTextContains('Added a shortcut for Create Article.');
$this->config('system.theme')->set('default', 'seven')->save(); $this->config('system.theme')->set('default', 'claro')->save();
$this->drupalGet('node/' . $this->node->id()); $this->drupalGet('node/' . $this->node->id());
$title = $this->node->getTitle(); $title = $this->node->getTitle();
...@@ -315,9 +315,9 @@ public function testShortcutLinkDelete() { ...@@ -315,9 +315,9 @@ public function testShortcutLinkDelete() {
*/ */
public function testNoShortcutLink() { public function testNoShortcutLink() {
// Change to a theme that displays shortcuts. // Change to a theme that displays shortcuts.
\Drupal::service('theme_installer')->install(['seven']); \Drupal::service('theme_installer')->install(['claro']);
$this->config('system.theme') $this->config('system.theme')
->set('default', 'seven') ->set('default', 'claro')
->save(); ->save();
$this->drupalGet('page-that-does-not-exist'); $this->drupalGet('page-that-does-not-exist');
...@@ -343,9 +343,9 @@ public function testNoShortcutLink() { ...@@ -343,9 +343,9 @@ public function testNoShortcutLink() {
*/ */
public function testAccessShortcutsPermission() { public function testAccessShortcutsPermission() {
// Change to a theme that displays shortcuts. // Change to a theme that displays shortcuts.
\Drupal::service('theme_installer')->install(['seven']); \Drupal::service('theme_installer')->install(['claro']);
$this->config('system.theme') $this->config('system.theme')
->set('default', 'seven') ->set('default', 'claro')
->save(); ->save();
// Add cron to the default shortcut set. // Add cron to the default shortcut set.
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* @group shortcut * @group shortcut
*/ */
class ShortcutSevenIntegrationTest extends KernelTestBase { class ShortcutClaroIntegrationTest extends KernelTestBase {
protected static $modules = ['system']; protected static $modules = ['system'];
...@@ -17,15 +17,15 @@ class ShortcutSevenIntegrationTest extends KernelTestBase { ...@@ -17,15 +17,15 @@ class ShortcutSevenIntegrationTest extends KernelTestBase {
* Tests shortcut_install() and shortcut_uninstall(). * Tests shortcut_install() and shortcut_uninstall().
*/ */
public function testInstallUninstall() { public function testInstallUninstall() {
// Install seven. // Install claro.
\Drupal::service('theme_installer')->install(['seven']); \Drupal::service('theme_installer')->install(['claro']);
$this->assertNull($this->config('seven.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in seven.settings.'); $this->assertNull($this->config('claro.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in claro.settings.');
\Drupal::service('module_installer')->install(['shortcut']); \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.'); $this->assertTrue($this->config('claro.settings')->get('third_party_settings.shortcut.module_link'), 'The shortcut module_link setting is in claro.settings.');
\Drupal::service('module_installer')->uninstall(['shortcut']); \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.'); $this->assertNull($this->config('claro.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in claro.settings.');
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment