function TaxonomyAttributesTest::setUp

Same name in other branches
  1. 9 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() {
    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.