function EmailFieldRdfaTest::testAllFormatters

Same name in other branches
  1. 9 core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php \Drupal\Tests\rdf\Kernel\Field\EmailFieldRdfaTest::testAllFormatters()

Tests all email formatters.

File

core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php, line 44

Class

EmailFieldRdfaTest
Tests RDFa output by email field formatters.

Namespace

Drupal\Tests\rdf\Kernel\Field

Code

public function testAllFormatters() {
    // Test the plain formatter.
    $this->assertFormatterRdfa([
        'type' => 'string',
    ], 'http://schema.org/email', [
        'value' => $this->testValue,
    ]);
    // Test the mailto formatter.
    $this->assertFormatterRdfa([
        'type' => 'email_mailto',
    ], 'http://schema.org/email', [
        'value' => $this->testValue,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.