function ShortcutCacheTagsTest::setUp

Overrides KernelTestBase::setUp

File

core/modules/shortcut/tests/src/Kernel/ShortcutCacheTagsTest.php, line 51

Class

ShortcutCacheTagsTest
Tests the Shortcut entity's cache tags.

Namespace

Drupal\Tests\shortcut\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->installEntitySchema('user');
  $this->installEntitySchema('shortcut');
  $this->installEntitySchema('shortcut_set');
  $this->adminUser = $this->createUser([
    'access toolbar',
    'access shortcuts',
    'administer site configuration',
    'administer shortcuts',
    'administer themes',
  ]);
  $this->shortcutSet = ShortcutSet::create([
    'id' => 'default',
    'label' => 'Default',
  ]);
  $this->shortcutSet
    ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.