function EntityMaskTest::testLoad

Same name and namespace in other branches
  1. 4.0.x modules/ctools_entity_mask/tests/src/Kernel/EntityMaskTest.php \Drupal\Tests\ctools_entity_mask\Kernel\EntityMaskTest::testLoad()

Tests that mask entities cannot be loaded.

@depends testId

File

modules/ctools_entity_mask/tests/src/Kernel/EntityMaskTest.php, line 187

Class

EntityMaskTest
Basic test of entity type masking.

Namespace

Drupal\Tests\ctools_entity_mask\Kernel

Code

public function testLoad() {
  $block = BlockContent::create([
    'type' => 'basic',
  ]);
  $block->save();
  /** @var \Drupal\Core\Entity\EntityStorageInterface $storage */
  $storage = $this->container
    ->get('entity_type.manager')
    ->getStorage('fake_block_content');
  $id = $block->id();
  $this->assertNull($storage->load($id));
  $this->assertEmpty($storage->loadMultiple([
    $id,
  ]));
}