You are here

public function FixedToContentMappingTest::testGetBlockContentOnUnlinked in Fixed Block Content 8

Tests the get block content method on not linked fixed block.

File

tests/src/Kernel/FixedToContentMappingTest.php, line 68

Class

FixedToContentMappingTest
Tests the fixed block content mapping handler.

Namespace

Drupal\Tests\fixed_block_content\Kernel

Code

public function testGetBlockContentOnUnlinked() {

  // Try to get the block content for the initially unlinked fixed block.
  $block_content = $this->mappingHandler
    ->getBlockContent($this->fixedBlock
    ->id());
  $this
    ->assertNull($block_content);

  // Get the existing block content (no create) should return NULL as well.
  $block_content = $this->fixedBlock
    ->getBlockContent(FALSE);
  $this
    ->assertNull($block_content);
}