public function RdfaAttributesTest::testDatatype in Drupal 9
Same name and namespace in other branches
- 8 core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php \Drupal\Tests\rdf\Kernel\RdfaAttributesTest::testDatatype()
- 10 core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php \Drupal\Tests\rdf\Kernel\RdfaAttributesTest::testDatatype()
Tests attribute creation for mappings which use 'datatype'.
File
- core/
modules/ rdf/ tests/ src/ Kernel/ RdfaAttributesTest.php, line 36
Class
- RdfaAttributesTest
- Tests RDFa attribute generation from RDF mapping.
Namespace
Drupal\Tests\rdf\KernelCode
public function testDatatype() {
$properties = [
'foo:bar1',
];
$datatype = 'foo:bar1type';
$mapping = [
'datatype' => $datatype,
'properties' => $properties,
];
$expected_attributes = [
'datatype' => $datatype,
'property' => $properties,
];
$this
->_testAttributes($expected_attributes, $mapping);
}