You are here

protected function ParagraphsMigrationTestBase::assertFieldInstanceExists in Paragraphs 8

Test if the given field instance was created.

1 call to ParagraphsMigrationTestBase::assertFieldInstanceExists()
ParagraphsFieldMigrationTest::testParagrahsFieldInstanceMigration in tests/src/Kernel/migrate/ParagraphsFieldMigrationTest.php
Test if the paragraph field instances were migrated.

File

tests/src/Kernel/migrate/ParagraphsMigrationTestBase.php, line 81

Class

ParagraphsMigrationTestBase
Base class for the paragraph migrations tests.

Namespace

Drupal\Tests\paragraphs\Kernel\migrate

Code

protected function assertFieldInstanceExists($entity_type, $bundle, $field_name, $field_type = 'entity_reference_revisions') {
  $field = FieldConfig::loadByName($entity_type, $bundle, $field_name);
  $this
    ->assertNotNull($field);
  $this
    ->assertEquals($field_type, $field
    ->getType());
}