Issue #3281440 by _shY, nod_: Update Shortcut tests to not use Bartik and Seven
(cherry picked from commit 02656d5d01)
merge-requests/2237/head
parent
decfbd1db9
commit
4d6ae45b5b
|
|
@ -148,8 +148,8 @@ class ShortcutLinksTest extends ShortcutTestBase {
|
|||
* Tests that the "add to shortcut" and "remove from shortcut" links work.
|
||||
*/
|
||||
public function testShortcutQuickLink() {
|
||||
\Drupal::service('theme_installer')->install(['seven']);
|
||||
$this->config('system.theme')->set('admin', 'seven')->save();
|
||||
\Drupal::service('theme_installer')->install(['claro']);
|
||||
$this->config('system.theme')->set('admin', 'claro')->save();
|
||||
$this->config('node.settings')->set('use_admin_theme', '1')->save();
|
||||
$this->container->get('router.builder')->rebuild();
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ class ShortcutLinksTest extends ShortcutTestBase {
|
|||
$this->clickLink('Add to Default shortcuts');
|
||||
$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());
|
||||
$title = $this->node->getTitle();
|
||||
|
||||
|
|
@ -315,9 +315,9 @@ class ShortcutLinksTest extends ShortcutTestBase {
|
|||
*/
|
||||
public function testNoShortcutLink() {
|
||||
// Change to a theme that displays shortcuts.
|
||||
\Drupal::service('theme_installer')->install(['seven']);
|
||||
\Drupal::service('theme_installer')->install(['claro']);
|
||||
$this->config('system.theme')
|
||||
->set('default', 'seven')
|
||||
->set('default', 'claro')
|
||||
->save();
|
||||
|
||||
$this->drupalGet('page-that-does-not-exist');
|
||||
|
|
@ -343,9 +343,9 @@ class ShortcutLinksTest extends ShortcutTestBase {
|
|||
*/
|
||||
public function testAccessShortcutsPermission() {
|
||||
// Change to a theme that displays shortcuts.
|
||||
\Drupal::service('theme_installer')->install(['seven']);
|
||||
\Drupal::service('theme_installer')->install(['claro']);
|
||||
$this->config('system.theme')
|
||||
->set('default', 'seven')
|
||||
->set('default', 'claro')
|
||||
->save();
|
||||
|
||||
// Add cron to the default shortcut set.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use Drupal\KernelTests\KernelTestBase;
|
|||
*
|
||||
* @group shortcut
|
||||
*/
|
||||
class ShortcutSevenIntegrationTest extends KernelTestBase {
|
||||
class ShortcutClaroIntegrationTest extends KernelTestBase {
|
||||
|
||||
protected static $modules = ['system'];
|
||||
|
||||
|
|
@ -17,15 +17,15 @@ class ShortcutSevenIntegrationTest extends KernelTestBase {
|
|||
* Tests shortcut_install() and shortcut_uninstall().
|
||||
*/
|
||||
public function testInstallUninstall() {
|
||||
// Install seven.
|
||||
\Drupal::service('theme_installer')->install(['seven']);
|
||||
$this->assertNull($this->config('seven.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in seven.settings.');
|
||||
// Install claro.
|
||||
\Drupal::service('theme_installer')->install(['claro']);
|
||||
$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']);
|
||||
$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']);
|
||||
$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.');
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue