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