You are here

protected function BlockStorageUnitTest::loadTests in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::loadTests()
  2. 9 core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::loadTests()

Tests the loading of blocks.

File

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

Class

BlockStorageUnitTest
Tests the storage of blocks.

Namespace

Drupal\Tests\block\Kernel

Code

protected function loadTests() {
  $entity = $this->controller
    ->load('test_block');
  $this
    ->assertInstanceOf(Block::class, $entity);

  // Verify several properties of the block.
  $this
    ->assertSame('content', $entity
    ->getRegion());
  $this
    ->assertTrue($entity
    ->status());
  $this
    ->assertEquals('stark', $entity
    ->getTheme());
  $this
    ->assertNotEmpty($entity
    ->uuid());
}