You are here

protected function EmailFieldRdfaTest::setUp in Zircon Profile 8

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

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

Overrides FieldRdfaTestBase::setUp

File

core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php, line 26
Contains \Drupal\rdf\Tests\Field\EmailFieldRdfaTest.

Class

EmailFieldRdfaTest
Tests RDFa output by email field formatters.

Namespace

Drupal\rdf\Tests\Field

Code

protected function setUp() {
  parent::setUp();
  $this
    ->createTestField();

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

  // Set up test values.
  $this->testValue = 'test@example.com';
  $this->entity = entity_create('entity_test', array());
  $this->entity->{$this->fieldName}->value = $this->testValue;
}