protected function BlockStorageUnitTest::loadTests in Drupal 10
Same name and namespace in other branches
- 8 core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::loadTests()
- 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\KernelCode
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());
}