protected function BlockStorageUnitTest::loadTests

Tests the rendering of blocks.

1 call to BlockStorageUnitTest::loadTests()
BlockStorageUnitTest::testBlockCRUD in drupal/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
Tests CRUD operations.

File

drupal/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php, line 118
Contains \Drupal\block\Tests\BlockStorageUnitTest.

Class

BlockStorageUnitTest
Tests the storage of blocks.

Namespace

Drupal\block\Tests

Code

protected function loadTests() {
  $entities = $this->controller
    ->load(array(
    'stark.test_block',
  ));
  $entity = reset($entities);
  $this
    ->assertTrue($entity instanceof Block, 'The loaded entity is a Block.');

  // Verify several properties of the block.
  $this
    ->assertEqual($entity
    ->get('region'), '-1');
  $this
    ->assertTrue($entity
    ->get('status'));
  $this
    ->assertEqual($entity
    ->get('theme'), 'stark');
  $this
    ->assertTrue($entity
    ->uuid());
}