StringFieldRdfaTest.php in Zircon Profile 8
File
core/modules/rdf/src/Tests/Field/StringFieldRdfaTest.php
View source
<?php
namespace Drupal\rdf\Tests\Field;
class StringFieldRdfaTest extends FieldRdfaTestBase {
protected $fieldType = 'string';
protected $testValue = 'test_text_value';
protected $testSummary = 'test_summary_value';
public function setUp() {
parent::setUp();
$this
->createTestField();
$mapping = rdf_get_mapping('entity_test', 'entity_test');
$mapping
->setFieldMapping($this->fieldName, array(
'properties' => array(
'schema:text',
),
))
->save();
$this->entity = entity_create('entity_test');
$this->entity->{$this->fieldName}->value = $this->testValue;
$this->entity->{$this->fieldName}->summary = $this->testSummary;
}
public function testStringFormatters() {
$this
->assertFormatterRdfa(array(
'type' => 'string',
), 'http://schema.org/text', array(
'value' => $this->testValue,
));
}
}