protected function ParagraphsMigrationTestBase::assertParagraphBundleExists

Check to see if paragraph types were created.

Parameters

string $bundle_machine_name: The bundle to test for.

string $bundle_label: The bundle's label.

1 call to ParagraphsMigrationTestBase::assertParagraphBundleExists()
ParagraphsTypeMigrationTest::testParagraphsTypeMigration in paragraphs/tests/src/Kernel/migrate/ParagraphsTypeMigrationTest.php
Test if the paragraph/fc types were brought over as a paragraph.

File

paragraphs/tests/src/Kernel/migrate/ParagraphsMigrationTestBase.php, line 43

Class

ParagraphsMigrationTestBase
Base class for the paragraph migrations tests.

Namespace

Drupal\Tests\paragraphs\Kernel\migrate

Code

protected function assertParagraphBundleExists($bundle_machine_name, $bundle_label) {
  $bundle = ParagraphsType::load($bundle_machine_name);
  $this
    ->assertInstanceOf(ParagraphsType::class, $bundle);
  $this
    ->assertEquals($bundle_label, $bundle
    ->label());
}