public function MigrateVocabularyFieldTest::testVocabularyField in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyFieldTest.php \Drupal\taxonomy\Tests\Migrate\d6\MigrateVocabularyFieldTest::testVocabularyField()
Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
File
- core/
modules/ taxonomy/ src/ Tests/ Migrate/ d6/ MigrateVocabularyFieldTest.php, line 37 - Contains \Drupal\taxonomy\Tests\Migrate\d6\MigrateVocabularyFieldTest.
Class
- MigrateVocabularyFieldTest
- Vocabulary field migration.
Namespace
Drupal\taxonomy\Tests\Migrate\d6Code
public function testVocabularyField() {
// Test that the field exists.
$field_storage_id = 'node.tags';
$field_storage = FieldStorageConfig::load($field_storage_id);
$this
->assertIdentical($field_storage_id, $field_storage
->id());
$settings = $field_storage
->getSettings();
$this
->assertIdentical('taxonomy_term', $settings['target_type'], "Target type is correct.");
$this
->assertIdentical(array(
'node',
'tags',
), Migration::load('d6_vocabulary_field')
->getIdMap()
->lookupDestinationID(array(
4,
)), "Test IdMap");
}