You are here

function RdfaAttributesTest::testDatatype in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/rdf/src/Tests/RdfaAttributesTest.php \Drupal\rdf\Tests\RdfaAttributesTest::testDatatype()

Test attribute creation for mappings which use 'datatype'.

File

core/modules/rdf/src/Tests/RdfaAttributesTest.php, line 41
Contains \Drupal\rdf\Tests\RdfaAttributesTest.

Class

RdfaAttributesTest
Tests RDFa attribute generation from RDF mapping.

Namespace

Drupal\rdf\Tests

Code

function testDatatype() {
  $properties = array(
    'foo:bar1',
  );
  $datatype = 'foo:bar1type';
  $mapping = array(
    'datatype' => $datatype,
    'properties' => $properties,
  );
  $expected_attributes = array(
    'datatype' => $datatype,
    'property' => $properties,
  );
  $this
    ->_testAttributes($expected_attributes, $mapping);
}