diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EntityReferenceRdfaTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EntityReferenceRdfaTest.php index de7c504..cb31dd5 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EntityReferenceRdfaTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EntityReferenceRdfaTest.php @@ -25,7 +25,7 @@ class EntityReferenceRdfaTest extends FieldRdfaTestBase { * * @var \Drupal\taxonomy\Entity\Term */ - protected $term; + protected $the_entity; /** * The URI of the term for testing. @@ -83,10 +83,10 @@ public function setUp() { ))->save(); // Set up test values. - $this->entity = entity_create('entity_test'); - $this->entity->{$this->fieldName}->target_id = 2; + $this->entity->{$this->fieldName}->target_id = $entity2->id(); $this->entity->save(); $this->uri = $this->getAbsoluteUri($this->entity); + $this->the_entity = $entity2->name->value; } /** @@ -94,7 +94,7 @@ public function setUp() { */ public function testAllFormatters() { // Tests the label formatter. - $this->assertFormatterRdfa(array('type' => 'entity_reference_label'), 'http://schema.org/knows', array('value' => $this->entity->{$this->fieldName}->target_id, 'type' => 'literal')); + $this->assertFormatterRdfa(array('type' => 'entity_reference_label'), 'http://schema.org/knows', array('value' => $this->the_entity, 'type' => 'literal')); // Tests the entity formatter. $entity_uri = $this->getAbsoluteUri($this->entity); $this->assertFormatterRdfa(array('type'=>'taxonomy_term_reference_link'), 'http://schema.org/knows', array('value' => $entity_uri, 'type' => 'uri'));