diff --git a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
index cdbd7b63c7016a07d761d879bdaa9fbc7cea215e..c4eada729ac7795a2c45d8104d96b25711ba0fad 100644
--- a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
+++ b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
@@ -68,7 +68,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['node_test_views
       foreach ($langcodes as $langcode) {
         if (!$node->hasTranslation($langcode)) {
           $title = $this->randomMachineName() . ' [' . $node->id() . ':' . $langcode . ']';
-          $translation = $node->addTranslation($langcode, ['title' => $title, 'promote' => FALSE]);
+          $node->addTranslation($langcode, ['title' => $title, 'promote' => FALSE]);
         }
       }
       $node->save();
@@ -78,7 +78,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['node_test_views
     $node = $this->nodes[2];
     $langcode = 'en';
     $title = $this->randomMachineName() . ' [' . $node->id() . ':' . $langcode . ']';
-    $translation = $node->addTranslation($langcode, ['title' => $title]);
+    $node->addTranslation($langcode, ['title' => $title]);
     $node->save();
 
     // Check that all created translations are selected by the test view.