Commit fb01ce4e authored by alexpott's avatar alexpott

Issue #2266763 by ashepherd, kay_v, lauggh | scor: Add debug mode to FieldRdfaTestBase class.

parent a6eb26d7
......@@ -38,6 +38,13 @@
*/
protected $entity;
/**
* TRUE if verbose debugging is enabled.
*
* @var bool
*/
protected $debug = TRUE;
/**
* Modules to enable.
*
......@@ -84,6 +91,14 @@ protected function assertFormatterRdfa($formatter, $property, $expected_rdf_valu
$build = entity_view($this->entity, 'default');
$output = drupal_render($build);
$graph = new \EasyRdf_Graph($this->uri, $output, 'rdfa');
// If verbose debugging is turned on, display the HTML and parsed RDF
// in the results.
if ($this->debug) {
debug($output);
debug($graph->toRdfPhp());
}
$this->assertTrue($graph->hasProperty($this->uri, $property, $expected_rdf_value), "Formatter {$formatter['type']} exposes data correctly for {$this->fieldType} fields.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment