You are here

public function EmailFieldRdfaTest::testAllFormatters in Zircon Profile 8

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

Tests all email formatters.

File

core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php, line 46
Contains \Drupal\rdf\Tests\Field\EmailFieldRdfaTest.

Class

EmailFieldRdfaTest
Tests RDFa output by email field formatters.

Namespace

Drupal\rdf\Tests\Field

Code

public function testAllFormatters() {

  // Test the plain formatter.
  $this
    ->assertFormatterRdfa(array(
    'type' => 'string',
  ), 'http://schema.org/email', array(
    'value' => $this->testValue,
  ));

  // Test the mailto formatter.
  $this
    ->assertFormatterRdfa(array(
    'type' => 'email_mailto',
  ), 'http://schema.org/email', array(
    'value' => $this->testValue,
  ));
}