diff --git a/core/tests/Drupal/FunctionalTests/WebAssertTest.php b/core/tests/Drupal/FunctionalTests/WebAssertTest.php
index 59348ecb9e40fe1a4dc23dff27375db0eec02e04..c7a588ad20ed46f4e163eba8c0f13b71e15e6db1 100644
--- a/core/tests/Drupal/FunctionalTests/WebAssertTest.php
+++ b/core/tests/Drupal/FunctionalTests/WebAssertTest.php
@@ -3,7 +3,6 @@
 namespace Drupal\FunctionalTests;
 
 use Drupal\Tests\BrowserTestBase;
-use Behat\Mink\Exception\ExpectationException;
 use Behat\Mink\Exception\ResponseTextException;
 use PHPUnit\Framework\AssertionFailedError;
 
@@ -20,7 +19,6 @@ class WebAssertTest extends BrowserTestBase {
    */
   protected static $modules = [
     'test_page_test',
-    'dblog',
   ];
 
   /**
@@ -56,33 +54,6 @@ public function testResponseHeaderDoesNotExist() {
     $this->assertSession()->responseHeaderDoesNotExist('Null-Header');
   }
 
-  /**
-   * Tests that addressEquals distinguishes querystrings.
-   *
-   * @covers ::addressEquals
-   */
-  public function testAddressEqualsDistinguishesQuerystrings() {
-    // Insert 300 log messages.
-    $logger = $this->container->get('logger.factory')->get('pager_test');
-    for ($i = 0; $i < 300; $i++) {
-      $logger->debug($this->randomString());
-    }
-
-    // Get to the db log report.
-    $this->drupalLogin($this->drupalCreateUser([
-      'access site reports',
-    ]));
-    $this->drupalGet('admin/reports/dblog');
-    $this->assertSession()->addressEquals('admin/reports/dblog');
-
-    // Go to the second page, we expect the querystring to change to '?page=1'.
-    $this->drupalGet('admin/reports/dblog', ['query' => ['page' => 1]]);
-    $this->assertSession()->addressEquals('admin/reports/dblog?page=1');
-    $this->expectException(ExpectationException::class);
-    $this->expectExceptionMessage('Current page is "/admin/reports/dblog?page=1", but "/admin/reports/dblog" expected.');
-    $this->assertSession()->addressEquals('admin/reports/dblog');
-  }
-
   /**
    * @covers ::pageTextMatchesCount
    */
diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php
index 06b95521db3ef16eab04aedc300d9063d1b41b82..1856ab5ffb908a0703dd8e6e2055a567b427e464 100644
--- a/core/tests/Drupal/Tests/WebAssert.php
+++ b/core/tests/Drupal/Tests/WebAssert.php
@@ -58,13 +58,7 @@ protected function cleanUrl($url) {
     if (parse_url($url, PHP_URL_HOST) === NULL && strpos($url, '/') !== 0) {
       $url = "/$url";
     }
-
-    $parts = parse_url($url);
-    $fragment = empty($parts['fragment']) ? '' : '#' . $parts['fragment'];
-    $query = empty($parts['query']) ? '' : '?' . $parts['query'];
-    $path = empty($parts['path']) ? '/' : $parts['path'];
-
-    return preg_replace('/^\/[^\.\/]+\.php\//', '/', $path) . $query . $fragment;
+    return parent::cleanUrl($url);
   }
 
   /**