protected function DateTimeFieldRdfaTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/rdf/src/Tests/Field/DateTimeFieldRdfaTest.php \Drupal\rdf\Tests\Field\DateTimeFieldRdfaTest::setUp()
Set the default field storage backend for fields created during tests.
Overrides FieldRdfaTestBase::setUp
File
- core/
modules/ rdf/ src/ Tests/ Field/ DateTimeFieldRdfaTest.php, line 33 - Contains \Drupal\rdf\Tests\Field\DateTimeFieldRdfaTest.
Class
- DateTimeFieldRdfaTest
- Tests RDFa output by datetime field formatters.
Namespace
Drupal\rdf\Tests\FieldCode
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:dateCreated',
),
))
->save();
// Set up test entity.
$this->entity = entity_create('entity_test', array());
$this->entity->{$this->fieldName}->value = $this->testValue;
}