protected function UserAttributesTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/rdf/tests/src/Functional/UserAttributesTest.php \Drupal\Tests\rdf\Functional\UserAttributesTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/modules/ rdf/ tests/ src/ Functional/ UserAttributesTest.php, line 37 
Class
- UserAttributesTest
- Tests the RDFa markup of Users.
Namespace
Drupal\Tests\rdf\FunctionalCode
protected function setUp() : void {
  parent::setUp();
  rdf_get_mapping('user', 'user')
    ->setBundleMapping([
    'types' => [
      'sioc:UserAccount',
    ],
  ])
    ->setFieldMapping('name', [
    'properties' => [
      'foaf:name',
    ],
  ])
    ->save();
  // Prepares commonly used URIs.
  $this->baseUri = Url::fromRoute('<front>', [], [
    'absolute' => TRUE,
  ])
    ->toString();
  // Set to test the altered display name.
  \Drupal::state()
    ->set('user_hooks_test_user_format_name_alter', TRUE);
}