You are here

protected function BlockStorageUnitTest::loadTests in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php \Drupal\Tests\block\Kernel\BlockStorageUnitTest::loadTests()
  2. 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\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
    ->assertEqual($entity
    ->getTheme(), 'stark');
  $this
    ->assertNotEmpty($entity
    ->uuid());
}