function TaxonomyAttributesTest::setUp

Same name in other branches
  1. 8.9.x 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 48

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.