diff --git a/tests/src/Kernel/EntityReferenceRevisionsSaveTest.php b/tests/src/Kernel/EntityReferenceRevisionsSaveTest.php index d7c856c..2b66a63 100644 --- a/tests/src/Kernel/EntityReferenceRevisionsSaveTest.php +++ b/tests/src/Kernel/EntityReferenceRevisionsSaveTest.php @@ -104,21 +104,21 @@ class EntityReferenceRevisionsSaveTest extends KernelTestBase { $new_text = 'Dummy text again'; // Set another name and save the node without marking it as needs saving. - $entity_test->name = $new_text; - $entity_test->setNeedsSave(FALSE); + $entity_test_after->name = $new_text; + $entity_test_after->setNeedsSave(FALSE); // Load the Node and check the composite reference entity is not returned // from getValue() if it is not marked as needs saving. $node = Node::load($node->id()); $values = $node->composite_reference->getValue(); $this->assertFalse(isset($values[0]['entity'])); - $node->composite_reference = $entity_test; + $node->composite_reference = $entity_test_after; $node->save(); // Check the name is not updated. \Drupal::entityTypeManager()->getStorage('entity_test_composite')->resetCache(); $entity_test_after = EntityTestCompositeRelationship::load($entity_test->id()); - static::assertEquals($entity_test_after->name->value, $text); + static::assertEquals($text, $entity_test_after->name->value); // Test if after delete the referenced entity there are no problems setting // the referencing values to the parent.