Problem/Motivation
All field formatters supporting RDFa will most likely be making use of the FieldRdfaTestBase class to write tests. Given that we're in unit test, there is no default page output available to aid debugging in the test results.
Proposed resolution
Add our own debugging output for the HTML rendered by the field formatter (which includes the RDFa markup) and the RDF graph as parsed by EasyRdf.
The debug mode will be enabled with the 'debug' property on the FieldRdfaTestBase class. It could default to TRUE.
Remaining tasks
write a patch
User interface changes
none
API changes
new 'debug' property in FieldRdfaTestBase.
Comments
Comment #1
scor commentedComment #2
ashepherd commentedComment #3
ashepherd commentedComment #4
ashepherd commentedremoved whitespace from 1st patch
Comment #5
ashepherd commentedwrapped the debug() calls with check of $debug property
Comment #6
lokapujyaThe if statement should follow the drupal coding standards.
Comment #7
ashepherd commentedah, thanks!
Comment #9
lokapujyaCloser. Typically, we don't have spaces inside the parenthesis.
Comment #11
ashepherd commentedI'm a bonehead...my bad. thanks Jamie
Comment #12
ashepherd commentedComment #13
scor commentedMaybe a better description message would be "TRUE if verbose debugging is enabled."
Maybe add comment saying that both the HTML and the parsed RDF are displayed in the results.
Comment #14
ashepherd commented+1
Comment #15
scor commentedline should be < 80 characters. Make sure you end the sentence with a period :)
Comment #16
kay_v commentedmade suggested changes.
Comment #17
kay_v commentedstripped trailing whitespace at end of comment line :)
Comment #18
scor commentedLet's do this...
Comment #20
lauggh commentedre-rolled the patch to use /src instead of /lib/Drupal/rdf/
Comment #21
scor commentedpatch looks good now. Thanks Grace for the reroll!
Comment #22
alexpottCommitted fb01ce4 and pushed to 8.x. Thanks!