protected function StandardProfileTest::doTermRdfaTests in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/rdf/src/Tests/StandardProfileTest.php \Drupal\rdf\Tests\StandardProfileTest::doTermRdfaTests()
Tests that term data is exposed on term page.
1 call to StandardProfileTest::doTermRdfaTests()
- 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 320 - Contains \Drupal\rdf\Tests\StandardProfileTest.
Class
- StandardProfileTest
- Tests the RDF mappings and RDFa markup of the standard profile.
Namespace
Drupal\rdf\TestsCode
protected function doTermRdfaTests() {
// Feed the HTML into the parser.
$graph = $this
->getRdfGraph($this->term
->urlInfo());
// Term type.
$this
->assertEqual($graph
->type($this->termUri), 'schema:Thing', "Term type was found (schema:Thing) on term page.");
// Term name.
$expected_value = array(
'type' => 'literal',
'value' => $this->term
->getName(),
'lang' => 'en',
);
$this
->assertTrue($graph
->hasProperty($this->termUri, 'http://schema.org/name', $expected_value), "Term name was found (schema:name) on term page.");
// @todo Add test for term description once it is a field:
// https://www.drupal.org/node/569434.
}