From f83bd898fd941047b4967ffcb6b0ec1ec95c908b Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Mon, 20 Jul 2020 10:13:35 +0100 Subject: [PATCH] Issue #3157919 by ultrabob, Hardik_Patel_12, shaktik, nijolawrence, alexpott, lauriii, Berdir, kiamlaluno: Remove unused variable $node from link module (cherry picked from commit f884044d46d192e05294ad9733ba8466a2287c4d) --- core/modules/link/tests/src/Functional/LinkFieldTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/modules/link/tests/src/Functional/LinkFieldTest.php b/core/modules/link/tests/src/Functional/LinkFieldTest.php index b78fe175bc..149a8f3b8f 100644 --- a/core/modules/link/tests/src/Functional/LinkFieldTest.php +++ b/core/modules/link/tests/src/Functional/LinkFieldTest.php @@ -727,7 +727,9 @@ public function testEditNonNodeEntityLink() { $entity_test_link = $entity_test_storage->create(['name' => 'correct link target']); $entity_test_link->save(); - $node = $this->drupalCreateNode(['wrong link target']); + // Create a node with the same ID as the test entity to ensure that the link + // doesn't match incorrectly. + $this->drupalCreateNode(['title' => 'wrong link target']); $correct_link = 'entity:entity_test/' . $entity_test_link->id(); $entity_test = $entity_test_storage->create([ -- GitLab