protected function BlockStorageUnitTest::loadTests in Drupal 8
Same name and namespace in other branches
- 9 core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::loadTests()
- 10 core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::loadTests()
Tests the loading of blocks.
1 call to BlockStorageUnitTest::loadTests()
- BlockStorageUnitTest::testBlockCRUD in core/
modules/ block/ tests/ src/ Kernel/ BlockStorageUnitTest.php - Tests CRUD operations.
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
->assertEqual($entity
->getTheme(), 'stark');
$this
->assertNotEmpty($entity
->uuid());
}