protected function ParagraphsMigrationTestBase::assertParagraphEntityFieldExists in Paragraphs 8
Check if a field storage config entity was created for the paragraph.
Parameters
string $field_name: The field to test for.
string $field_type: The expected field type.
1 call to ParagraphsMigrationTestBase::assertParagraphEntityFieldExists()
- ParagraphsFieldMigrationTest::testParagraphsFieldMigration in tests/
src/ Kernel/ migrate/ ParagraphsFieldMigrationTest.php - Test that the paragraph and field collection field storage was migrated.
File
- tests/
src/ Kernel/ migrate/ ParagraphsMigrationTestBase.php, line 57
Class
- ParagraphsMigrationTestBase
- Base class for the paragraph migrations tests.
Namespace
Drupal\Tests\paragraphs\Kernel\migrateCode
protected function assertParagraphEntityFieldExists($field_name, $field_type) {
$field_storage = FieldStorageConfig::loadByName('paragraph', $field_name);
$this
->assertNotNull($field_storage);
$this
->assertEquals($field_type, $field_storage
->getType());
}