diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index e042b31c6ce871a6869a0db2f8d774ea9851cbb4..0a75886ac9fb687ccfdb1bfeb239dd7dc69387b1 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -724,14 +724,6 @@ protected function drupalUserIsLoggedIn($account) {
     return (bool) db_query("SELECT sid FROM {users_field_data} u INNER JOIN {sessions} s ON u.uid = s.uid AND u.default_langcode = 1 WHERE s.sid = :sid", array(':sid' => Crypt::hashBase64($account->session_id)))->fetchField();
   }
 
-  /**
-   * Generate a token for the currently logged in user.
-   */
-  protected function drupalGetToken($value = '') {
-    $private_key = \Drupal::service('private_key')->get();
-    return Crypt::hmacBase64($value, $this->session_id . $private_key);
-  }
-
   /**
    * Logs a user out of the internal browser and confirms.
    *