You are here

public function EmailFieldRdfaTest::testAllFormatters in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php \Drupal\Tests\rdf\Kernel\Field\EmailFieldRdfaTest::testAllFormatters()
  2. 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,
  ]);
}