You are here

public function MigrateBlockContentStubTest::testStubFailure in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php \Drupal\Tests\block_content\Kernel\Migrate\MigrateBlockContentStubTest::testStubFailure()

Tests creation of block content stubs with no block_content_type available.

File

core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php, line 35

Class

MigrateBlockContentStubTest
Test stub creation for block_content entities.

Namespace

Drupal\Tests\block_content\Kernel\Migrate

Code

public function testStubFailure() {

  // Expected MigrateException thrown when no bundles exist.
  $this
    ->expectException(MigrateException::class);
  $this
    ->expectExceptionMessage('Stubbing failed, no bundles available for entity type: block_content');
  $this
    ->createEntityStub('block_content');
}