You are here

public function EntityMaskTest::testLoad in Chaos Tool Suite (ctools) 8.3

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,
  ]));
}