public function FieldCollectionsFieldInstanceSettingsTest::testFieldCollectionBadBundle in Paragraphs 8
Test that unexpected bundles trigger an exception.
File
- tests/
src/ Unit/ migrate/ FieldCollectionsFieldInstanceSettingsTest.php, line 52
Class
- FieldCollectionsFieldInstanceSettingsTest
- Test the ParagraphFieldInstanceSettings Process Plugin.
Namespace
Drupal\Tests\paragraphs\Unit\migrateCode
public function testFieldCollectionBadBundle() {
$this->row
->expects($this
->any())
->method('getSourceProperty')
->willReturnMap([
[
'type',
'field_collection',
],
[
'bundle',
'non_existent_bundle',
],
]);
$this
->expectException(MigrateSkipRowException::class);
$this
->expectExceptionMessage("No target paragraph bundle found for field_collection");
$this->plugin
->transform([], $this->migrateExecutable, $this->row, 'settings');
}