function FieldRdfaDatatypeCallbackTest::testDefaultFormatter

Same name and namespace in other branches
  1. 8.9.x core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php \Drupal\Tests\rdf\Kernel\Field\FieldRdfaDatatypeCallbackTest::testDefaultFormatter()

Tests the default formatter.

File

core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php, line 56

Class

FieldRdfaDatatypeCallbackTest
Tests the RDFa output of a text field formatter with a datatype callback.

Namespace

Drupal\Tests\rdf\Kernel\Field

Code

public function testDefaultFormatter() {
    // Expected value is the output of the datatype callback, not the raw value.
    $this->assertFormatterRdfa([
        'type' => 'text_default',
    ], 'http://schema.org/interactionCount', [
        'value' => 'foo' . $this->testValue,
    ]);
}

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