You are here

protected function TextFieldRdfaTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/rdf/src/Tests/Field/TextFieldRdfaTest.php \Drupal\rdf\Tests\Field\TextFieldRdfaTest::setUp()

Set the default field storage backend for fields created during tests.

Overrides FieldRdfaTestBase::setUp

File

core/modules/rdf/src/Tests/Field/TextFieldRdfaTest.php, line 40
Contains \Drupal\rdf\Tests\Field\TextFieldRdfaTest.

Class

TextFieldRdfaTest
Tests RDFa output by text field formatters.

Namespace

Drupal\rdf\Tests\Field

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installConfig(array(
    'filter',
  ));
  $this
    ->createTestField();

  // Add the mapping.
  $mapping = rdf_get_mapping('entity_test', 'entity_test');
  $mapping
    ->setFieldMapping($this->fieldName, array(
    'properties' => array(
      'schema:text',
    ),
  ))
    ->save();

  // Set up test entity.
  $this->entity = entity_create('entity_test');
  $this->entity->{$this->fieldName}->value = $this->testValue;
  $this->entity->{$this->fieldName}->summary = $this->testSummary;
}