function MigrateVocabularyFieldInstanceTest::assertTargetBundles
Same name in other branches
- 9 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d6\MigrateVocabularyFieldInstanceTest::assertTargetBundles()
- 11.x core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d6\MigrateVocabularyFieldInstanceTest::assertTargetBundles()
Asserts the settings of an entity reference field config entity.
Parameters
string $id: The entity ID in the form ENTITY_TYPE.BUNDLE.FIELD_NAME.
string[] $target_bundles: An array of expected target bundles.
1 call to MigrateVocabularyFieldInstanceTest::assertTargetBundles()
- MigrateVocabularyFieldInstanceTest::testVocabularyFieldInstance in core/
modules/ taxonomy/ tests/ src/ Kernel/ Migrate/ d6/ MigrateVocabularyFieldInstanceTest.php - Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
File
-
core/
modules/ taxonomy/ tests/ src/ Kernel/ Migrate/ d6/ MigrateVocabularyFieldInstanceTest.php, line 111
Class
- MigrateVocabularyFieldInstanceTest
- Vocabulary field instance migration.
Namespace
Drupal\Tests\taxonomy\Kernel\Migrate\d6Code
protected function assertTargetBundles($id, array $target_bundles) {
$field = FieldConfig::load($id);
$handler_settings = $field->getSetting('handler_settings');
$this->assertArrayHasKey('target_bundles', $handler_settings);
$this->assertSame($handler_settings['target_bundles'], $target_bundles);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.