diff --git a/core/modules/rdf/src/Tests/Field/EntityReferenceRdfaTest.php b/core/modules/rdf/src/Tests/Field/EntityReferenceRdfaTest.php index 58c6e86..891d605 100644 --- a/core/modules/rdf/src/Tests/Field/EntityReferenceRdfaTest.php +++ b/core/modules/rdf/src/Tests/Field/EntityReferenceRdfaTest.php @@ -57,7 +57,7 @@ public static function getInfo() { public function setUp() { parent::setUp(); - $this->installSchema('entity_test', array('entity_test_rev', 'entity_test_rev_revision')); + $this->installEntitySchema('entity_test_rev'); entity_reference_create_instance($this->entityType, $this->bundle, $this->fieldName, 'Field test', $this->entityType); @@ -76,13 +76,15 @@ public function setUp() { $this->entity->save(); $this->entity->{$this->fieldName}->entity = $this->target_entity; $this->entity->{$this->fieldName}->access = TRUE; + $this->uri = $this->getAbsoluteUri($this->entity); } /** * Tests all the entity reference formatters. */ public function testAllFormatters() { - $entity_uri = $this->uri . $this->getRelativeUri($this->target_entity); + $entity_uri = $this->getAbsoluteUri($this->target_entity); + // Tests the label formatter. $this->assertFormatterRdfa(array('type' => 'entity_reference_label'), 'http://schema.org/knows', array('value' => $entity_uri, 'type' => 'uri')); // Tests the entity formatter. diff --git a/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php b/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php index f34a05b..14bcfa1 100644 --- a/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php +++ b/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php @@ -115,8 +115,5 @@ protected function createTestField() { protected function getAbsoluteUri($entity) { return $entity->url('canonical', array('absolute' => TRUE)); } - protected function getRelativeUri($entity) { - return $entity->url('canonical', array('absolute' => FALSE)); - } }