protected function NodeAttributesTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/rdf/tests/src/Functional/NodeAttributesTest.php \Drupal\Tests\rdf\Functional\NodeAttributesTest::setUp()
Overrides NodeTestBase::setUp
File
- core/
modules/ rdf/ tests/ src/ Functional/ NodeAttributesTest.php, line 37
Class
- NodeAttributesTest
- Tests the RDFa markup of Nodes.
Namespace
Drupal\Tests\rdf\FunctionalCode
protected function setUp() : void {
parent::setUp();
rdf_get_mapping('node', 'article')
->setBundleMapping([
'types' => [
'sioc:Item',
'foaf:Document',
],
])
->setFieldMapping('title', [
'properties' => [
'dc:title',
],
])
->setFieldMapping('created', [
'properties' => [
'dc:date',
'dc:created',
],
'datatype' => 'xsd:dateTime',
'datatype_callback' => [
'callable' => 'Drupal\\rdf\\CommonDataConverter::dateIso8601Value',
],
])
->save();
// Prepares commonly used URIs.
$this->baseUri = Url::fromRoute('<front>', [], [
'absolute' => TRUE,
])
->toString();
}