function ShortcutCacheTagsTest::setUp

Same name in this branch
  1. main core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php \Drupal\Tests\shortcut\Functional\ShortcutCacheTagsTest::setUp()
Same name and namespace in other branches
  1. 11.x core/modules/shortcut/tests/src/Kernel/ShortcutCacheTagsTest.php \Drupal\Tests\shortcut\Kernel\ShortcutCacheTagsTest::setUp()
  2. 11.x core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php \Drupal\Tests\shortcut\Functional\ShortcutCacheTagsTest::setUp()
  3. 10 core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php \Drupal\Tests\shortcut\Functional\ShortcutCacheTagsTest::setUp()
  4. 9 core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php \Drupal\Tests\shortcut\Functional\ShortcutCacheTagsTest::setUp()
  5. 8.9.x core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php \Drupal\Tests\shortcut\Functional\ShortcutCacheTagsTest::setUp()

Overrides KernelTestBase::setUp

File

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

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->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.