diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
index 7db2827f650338dd9b50df6ffc8b64bd3c92fd9d..4ff0fa280a1ae4b78e0a4e40902f4cad939f62bf 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
@@ -414,7 +414,6 @@ public function testOrphanedSchemaEntries() {
 
     // Visit update.php and make sure we can click through to the 'No pending
     // updates' page without errors.
-    $assert_session = $this->assertSession();
     $this->drupalGet($this->updateUrl, ['external' => TRUE]);
     $this->updateRequirementsProblem();
     $this->clickLink(t('Continue'));