function StandardProfileTest::doUserRdfaTests
Same name in other branches
- 9 core/modules/rdf/tests/src/Functional/StandardProfileTest.php \Drupal\Tests\rdf\Functional\StandardProfileTest::doUserRdfaTests()
Tests that user data is exposed on user page.
1 call to StandardProfileTest::doUserRdfaTests()
- StandardProfileTest::testRdfaOutput in core/
modules/ rdf/ tests/ src/ Functional/ StandardProfileTest.php - Tests that data is exposed correctly when using standard profile.
File
-
core/
modules/ rdf/ tests/ src/ Functional/ StandardProfileTest.php, line 297
Class
- StandardProfileTest
- Tests the RDF mappings and RDFa markup of the standard profile.
Namespace
Drupal\Tests\rdf\FunctionalCode
protected function doUserRdfaTests() {
$this->drupalLogin($this->rootUser);
// User type.
$this->assertEqual($this->getElementRdfType($this->adminUser
->toUrl(), $this->baseUri, $this->authorUri), 'schema:Person', 'User type was found (schema:Person) on user page.');
// User name.
$expected_value = [
'type' => 'literal',
'value' => $this->adminUser
->label(),
];
$this->assertTrue($this->hasRdfProperty($this->getSession()
->getPage()
->getContent(), $this->baseUri, $this->authorUri, 'http://schema.org/name', $expected_value), 'User name was found (schema:name) on user page.');
$this->drupalLogout();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.