diff --git a/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php b/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
index 2354eba1b72653d8888fc34f0f6e8b8c1ac90e8d..26345f2c75a4291be58934c284d46dcfacc1dad3 100644
--- a/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
+++ b/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
@@ -193,7 +193,7 @@ public function testRevertAllDisplays() {
     // Revert the title of the block to the default ones, but submit some new
     // values to be sure that the new value is not stored.
     $edit = [];
-    $edit['title'] = $new_block_title = $this->randomMachineName();
+    $edit['title'] = $this->randomMachineName();
     $edit['override[dropdown]'] = 'default_revert';
 
     $this->drupalPostForm("admin/structure/views/nojs/display/{$view['id']}/block_1/title", $edit, t('Apply'));