You are here

public function LinkFieldRdfaTest::testAllFormattersFront in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/rdf/src/Tests/Field/LinkFieldRdfaTest.php \Drupal\rdf\Tests\Field\LinkFieldRdfaTest::testAllFormattersFront()

Tests all formatters with link to frontpage.

File

core/modules/rdf/src/Tests/Field/LinkFieldRdfaTest.php, line 82
Contains \Drupal\rdf\Tests\Field\LinkFieldRdfaTest.

Class

LinkFieldRdfaTest
Tests the placement of RDFa in link field formatters.

Namespace

Drupal\rdf\Tests\Field

Code

public function testAllFormattersFront() {

  // Set up test values.
  $this->testValue = '/';
  $this->entity = entity_create('entity_test', array());
  $this->entity->{$this->fieldName}->uri = 'internal:/';

  // Set up the expected result.
  $expected_rdf = array(
    'value' => $this->uri . '/',
    'type' => 'uri',
  );
  $this
    ->runTestAllFormatters($expected_rdf, 'front');
}