You are here

public function ShortcutSevenIntegrationTest::testInstallUninstall in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php \Drupal\Tests\shortcut\Kernel\ShortcutSevenIntegrationTest::testInstallUninstall()

Tests shortcut_install() and shortcut_uninstall().

File

core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php, line 19

Class

ShortcutSevenIntegrationTest
Tests shortcut_install() and shortcut_uninstall().

Namespace

Drupal\Tests\shortcut\Kernel

Code

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.');
  \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.');
}