diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceItemTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceItemTest.php index cc089fb..c8bed9a 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceItemTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceItemTest.php @@ -74,7 +74,7 @@ public function testEntityReferenceItem() { $this->assertTrue($entity->field_test_taxonomy instanceof FieldInterface, 'Field implements interface.'); $this->assertTrue($entity->field_test_taxonomy[0] instanceof FieldItemInterface, 'Field item implements interface.'); $this->assertEqual($entity->field_test_taxonomy->target_id, $tid); - $this->assertEqual($entity->field_test_taxonomy->entity->name, $this->term->name); + $this->assertEqual($entity->field_test_taxonomy->entity->name->value, $this->term->name->value); $this->assertEqual($entity->field_test_taxonomy->entity->id(), $tid); $this->assertEqual($entity->field_test_taxonomy->entity->uuid(), $this->term->uuid()); @@ -84,18 +84,18 @@ public function testEntityReferenceItem() { $entity->field_test_taxonomy->entity->save(); // Verify it is the correct name. $term = entity_load('taxonomy_term', $tid); - $this->assertEqual($term->name, $new_name); + $this->assertEqual($term->name->value, $new_name); // Make sure the computed term reflects updates to the term id. $term2 = entity_create('taxonomy_term', array( 'name' => $this->randomName(), - 'vid' => $this->term->vid, + 'vid' => $this->term->bundle(), 'langcode' => LANGUAGE_NOT_SPECIFIED, )); $term2->save(); $entity->field_test_taxonomy->target_id = $term2->id(); $this->assertEqual($entity->field_test_taxonomy->entity->id(), $term2->id()); - $this->assertEqual($entity->field_test_taxonomy->entity->name, $term2->name); + $this->assertEqual($entity->field_test_taxonomy->entity->name->value, $term2->name->value); } }