function MigrateBlockContentStubTest::testStubFailure

Same name in other branches
  1. 9 core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php \Drupal\Tests\block_content\Kernel\Migrate\MigrateBlockContentStubTest::testStubFailure()
  2. 10 core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php \Drupal\Tests\block_content\Kernel\Migrate\MigrateBlockContentStubTest::testStubFailure()
  3. 11.x 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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.