function TrackerAttributesTest::testAttributesInTracker

Tests for correct attributes on tracker page.

Creates nodes as both admin and anonymous user and tests for correct RDFa markup on the tracker page for those nodes and their comments.

File

drupal/core/modules/rdf/lib/Drupal/rdf/Tests/TrackerAttributesTest.php, line 53
Definition of Drupal\rdf\Tests\TrackerAttributesTest.

Class

TrackerAttributesTest
Tests the RDF tracker page mapping.

Namespace

Drupal\rdf\Tests

Code

function testAttributesInTracker() {

  // Create node as anonymous user.
  $node_anon = $this
    ->drupalCreateNode(array(
    'type' => 'article',
    'uid' => 0,
  ));

  // Create node as admin user.
  $node_admin = $this
    ->drupalCreateNode(array(
    'type' => 'article',
    'uid' => 1,
  ));

  // Pass both the anonymously posted node and the administrator posted node
  // through to test for the RDF attributes.
  $this
    ->_testBasicTrackerRdfaMarkup($node_anon);
  $this
    ->_testBasicTrackerRdfaMarkup($node_admin);
}