protected function StringFieldRdfaTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/rdf/tests/src/Kernel/Field/StringFieldRdfaTest.php \Drupal\Tests\rdf\Kernel\Field\StringFieldRdfaTest::setUp()
Set the default field storage backend for fields created during tests.
Overrides FieldRdfaTestBase::setUp
File
- core/
modules/ rdf/ tests/ src/ Kernel/ Field/ StringFieldRdfaTest.php, line 33
Class
- StringFieldRdfaTest
- Tests RDFa output by text field formatters.
Namespace
Drupal\Tests\rdf\Kernel\FieldCode
protected function setUp() {
parent::setUp();
$this
->createTestField();
// Add the mapping.
$mapping = rdf_get_mapping('entity_test', 'entity_test');
$mapping
->setFieldMapping($this->fieldName, [
'properties' => [
'schema:text',
],
])
->save();
// Set up test entity.
$this->entity = EntityTest::create();
$this->entity->{$this->fieldName}->value = $this->testValue;
$this->entity->{$this->fieldName}->summary = $this->testSummary;
}