You are here

protected function TaxonomyAttributesTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php \Drupal\Tests\rdf\Functional\TaxonomyAttributesTest::setUp()

Overrides TaxonomyTestBase::setUp

File

core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php, line 44

Class

TaxonomyAttributesTest
Tests the RDFa markup of Taxonomy terms.

Namespace

Drupal\Tests\rdf\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this->vocabulary = $this
    ->createVocabulary();

  // RDF mapping - term bundle.
  rdf_get_mapping('taxonomy_term', $this->vocabulary
    ->id())
    ->setBundleMapping([
    'types' => [
      'skos:Concept',
    ],
  ])
    ->setFieldMapping('name', [
    'properties' => [
      'rdfs:label',
      'skos:prefLabel',
    ],
  ])
    ->save();

  // Prepares commonly used URIs.
  $this->baseUri = Url::fromRoute('<front>', [], [
    'absolute' => TRUE,
  ])
    ->toString();
}