function BlockStorageUnitTest::setUp

Same name in other branches
  1. 9 core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::setUp()
  2. 8.9.x core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::setUp()
  3. 11.x core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php, line 36

Class

BlockStorageUnitTest
Tests the storage of blocks.

Namespace

Drupal\Tests\block\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->controller = $this->container
        ->get('entity_type.manager')
        ->getStorage('block');
    $this->container
        ->get('theme_installer')
        ->install([
        'stark',
    ]);
}

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