protected function StandardProfileTest::doUserRdfaTests in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/rdf/src/Tests/StandardProfileTest.php \Drupal\rdf\Tests\StandardProfileTest::doUserRdfaTests()
Tests that user data is exposed on user page.
1 call to StandardProfileTest::doUserRdfaTests()
- StandardProfileTest::testRdfaOutput in core/
modules/ rdf/ src/ Tests/ StandardProfileTest.php - Tests that data is exposed correctly when using standard profile.
File
- core/
modules/ rdf/ src/ Tests/ StandardProfileTest.php, line 298 - Contains \Drupal\rdf\Tests\StandardProfileTest.
Class
- StandardProfileTest
- Tests the RDF mappings and RDFa markup of the standard profile.
Namespace
Drupal\rdf\TestsCode
protected function doUserRdfaTests() {
$this
->drupalLogin($this->rootUser);
// Feed the HTML into the parser.
$graph = $this
->getRdfGraph($this->adminUser
->urlInfo());
// User type.
$this
->assertEqual($graph
->type($this->authorUri), 'schema:Person', "User type was found (schema:Person) on user page.");
// User name.
$expected_value = array(
'type' => 'literal',
'value' => $this->adminUser
->label(),
);
$this
->assertTrue($graph
->hasProperty($this->authorUri, 'http://schema.org/name', $expected_value), "User name was found (schema:name) on user page.");
$this
->drupalLogout();
}