function MigrateRdfMappingTest::assertRdfMapping
Same name in other branches
- 8.9.x core/modules/rdf/tests/src/Kernel/Migrate/d7/MigrateRdfMappingTest.php \Drupal\Tests\rdf\Kernel\Migrate\d7\MigrateRdfMappingTest::assertRdfMapping()
Asserts various aspects of a RDF mapping.
@internal
Parameters
string $entity_type: The entity type.
string $bundle: The bundle.
string[] $types: The expected RDF types.
array[] $field_mappings: The expected RDF field mappings.
1 call to MigrateRdfMappingTest::assertRdfMapping()
- MigrateRdfMappingTest::testRdfMappingMigration in core/
modules/ rdf/ tests/ src/ Kernel/ Migrate/ d7/ MigrateRdfMappingTest.php - Tests RDF mappings migration from Drupal 7 to 8.
File
-
core/
modules/ rdf/ tests/ src/ Kernel/ Migrate/ d7/ MigrateRdfMappingTest.php, line 57
Class
- MigrateRdfMappingTest
- Tests RDF mappings migration from Drupal 7 to 8.
Namespace
Drupal\Tests\rdf\Kernel\Migrate\d7Code
protected function assertRdfMapping(string $entity_type, string $bundle, array $types, array $field_mappings) : void {
$rdf_mapping = rdf_get_mapping($entity_type, $bundle);
$this->assertInstanceOf(RdfMappingInterface::class, $rdf_mapping);
$this->assertSame($types, $rdf_mapping->getBundleMapping());
foreach ($field_mappings as $field => $mapping) {
$this->assertSame($mapping, $rdf_mapping->getFieldMapping($field));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.