diff --git a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
index 42d6bd50bd1898ec8fcf9ad76ea644c4560ad202..dead2e53917d4dadcec426a9a8095fd208916ac9 100644
--- a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
@@ -25,7 +25,6 @@ class BlockConfigSchemaTest extends KernelTestBase {
     'comment',
     'forum',
     'node',
-    'statistics',
     // \Drupal\block\Entity\Block->preSave() calls system_region_list().
     'system',
     'taxonomy',
diff --git a/core/modules/search/tests/src/Functional/SearchRankingTest.php b/core/modules/search/tests/src/Functional/SearchRankingTest.php
index 30fb78ff1643776fe8bca45f59c1951aa4d38574..341809fd543e6480a536b453738ec5658c9aa837 100644
--- a/core/modules/search/tests/src/Functional/SearchRankingTest.php
+++ b/core/modules/search/tests/src/Functional/SearchRankingTest.php
@@ -4,7 +4,6 @@
 
 use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
 use Drupal\comment\Tests\CommentTestTrait;
-use Drupal\Core\Database\Database;
 use Drupal\Core\Link;
 use Drupal\Core\Url;
 use Drupal\filter\Entity\FilterFormat;
@@ -33,7 +32,7 @@ class SearchRankingTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected static $modules = ['node', 'search', 'statistics', 'comment'];
+  protected static $modules = ['node', 'search', 'comment'];
 
   /**
    * {@inheritdoc}
@@ -65,7 +64,7 @@ public function testRankings() {
     $this->addDefaultCommentField('node', 'page');
 
     // Build a list of the rankings to test.
-    $node_ranks = ['sticky', 'promote', 'relevance', 'recent', 'comments', 'views'];
+    $node_ranks = ['sticky', 'promote', 'relevance', 'recent', 'comments'];
 
     // Create nodes for testing.
     $nodes = [];
@@ -116,18 +115,7 @@ public function testRankings() {
     $this->submitForm($edit, 'Preview');
     $this->submitForm($edit, 'Save');
 
-    // Enable counting of statistics.
-    $this->config('statistics.settings')->set('count_content_views', 1)->save();
-
-    // Simulating content views is kind of difficult in the test. Leave that
-    // to the Statistics module. So instead go ahead and manually update the
-    // counter for this node.
-    $nid = $nodes['views'][1]->id();
-    Database::getConnection()->insert('node_counter')
-      ->fields(['totalcount' => 5, 'daycount' => 5, 'timestamp' => REQUEST_TIME, 'nid' => $nid])
-      ->execute();
-
-    // Run cron to update the search index and comment/statistics totals.
+    // Run cron to update the search index totals.
     $this->cronRun();
 
     // Test that the settings form displays the content ranking section.
@@ -177,7 +165,6 @@ public function testRankings() {
       'relevance' => 0,
       'recent' => 0,
       'comments' => 0,
-      'views' => 0,
     ];
     $configuration = $this->nodeSearch->getPlugin()->getConfiguration();
     foreach ($node_ranks as $var => $value) {
@@ -202,7 +189,6 @@ public function testRankings() {
       'relevance' => 0,
       'recent' => 10,
       'comments' => 1,
-      'views' => 0,
     ];
     $configuration = $this->nodeSearch->getPlugin()->getConfiguration();
     foreach ($node_ranks as $var => $value) {
diff --git a/core/modules/statistics/tests/src/Functional/search/SearchRankingTest.php b/core/modules/statistics/tests/src/Functional/search/SearchRankingTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..9b98988e4177f006b9c408fba78ca224d49d92e0
--- /dev/null
+++ b/core/modules/statistics/tests/src/Functional/search/SearchRankingTest.php
@@ -0,0 +1,116 @@
+<?php
+
+namespace Drupal\Tests\statistics\Functional\search;
+
+use Drupal\Core\Database\Database;
+use Drupal\search\Entity\SearchPage;
+use Drupal\Tests\BrowserTestBase;
+use Drupal\Tests\Traits\Core\CronRunTrait;
+
+/**
+ * Indexes content and tests ranking factors.
+ *
+ * @group statistics
+ */
+class SearchRankingTest extends BrowserTestBase {
+
+  use CronRunTrait;
+
+  /**
+   * The node search page.
+   *
+   * @var \Drupal\search\SearchPageInterface
+   */
+  protected $nodeSearch;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $modules = ['node', 'search', 'statistics'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected $defaultTheme = 'stark';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp(): void {
+    parent::setUp();
+
+    $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);
+
+    // Create a plugin instance.
+    $this->nodeSearch = SearchPage::load('node_search');
+
+    // Log in with sufficient privileges.
+    $this->drupalLogin($this->drupalCreateUser([
+      'create page content',
+      'administer search',
+    ]));
+  }
+
+  /**
+   * Tests statistics ranking on search pages.
+   */
+  public function testRankings() {
+    // Create nodes for testing.
+    $nodes = [];
+    $settings = [
+      'type' => 'page',
+      'title' => 'Drupal rocks',
+      'body' => [['value' => "Drupal's search rocks"]],
+      // Node is one day old.
+      'created' => \Drupal::time()->getRequestTime() - 24 * 3600,
+      'sticky' => 0,
+      'promote' => 0,
+    ];
+    foreach ([0, 1] as $num) {
+      $nodes['views'][$num] = $this->drupalCreateNode($settings);
+    }
+
+    // Enable counting of statistics.
+    $this->config('statistics.settings')->set('count_content_views', 1)->save();
+
+    // Simulating content views is kind of difficult in the test. So instead go
+    // ahead and manually update the counter for this node.
+    $nid = $nodes['views'][1]->id();
+    Database::getConnection()->insert('node_counter')
+      ->fields([
+        'totalcount' => 5,
+        'daycount' => 5,
+        'timestamp' => \Drupal::time()->getRequestTime(),
+        'nid' => $nid,
+      ])
+      ->execute();
+
+    // Run cron to update the search index and statistics totals.
+    $this->cronRun();
+
+    // Test that the settings form displays the content ranking section.
+    $this->drupalGet('admin/config/search/pages/manage/node_search');
+    $this->assertSession()->pageTextContains('Content ranking');
+
+    // Check that views ranking is visible and set to 0.
+    $this->assertSession()->optionExists('edit-rankings-views-value', '0');
+
+    // Test each of the possible rankings.
+    $edit = [];
+
+    // Enable views ranking.
+    $edit['rankings[views][value]'] = 10;
+    $this->drupalGet('admin/config/search/pages/manage/node_search');
+    $this->submitForm($edit, 'Save search page');
+    $this->drupalGet('admin/config/search/pages/manage/node_search');
+    $this->assertSession()->optionExists('edit-rankings-views-value', '10');
+
+    // Reload the plugin to get the up-to-date values.
+    $this->nodeSearch = SearchPage::load('node_search');
+    // Do the search and assert the results.
+    $this->nodeSearch->getPlugin()->setSearch('rocks', [], []);
+    $set = $this->nodeSearch->getPlugin()->execute();
+    $this->assertEquals($nodes['views'][1]->id(), $set[0]['node']->id());
+  }
+
+}
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
index 826581ffbc55cea681f5f9feb78867afc73c743f..4c6ca042fd04b3e1e86f4ea7c8a24d68c3875716 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
@@ -375,7 +375,6 @@ public function testUpdatedSite() {
       'search',
       'serialization',
       'shortcut',
-      'statistics',
       'syslog',
       'system',
       'taxonomy',
diff --git a/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php b/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
index 52925792a8820a07b6ad960392f39ef39c6f0e35..783f0b849bcf9a81e56e46958915417d8b96a0c7 100644
--- a/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
@@ -38,7 +38,6 @@ class HandlerAllTest extends ViewTestBase {
     'locale',
     'node',
     'search',
-    'statistics',
     'taxonomy',
     'user',
   ];
diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon
index a956663a84a5121613911f84e8ac40de68cc213f..741fa2d7ac99a7a6fb490cc40798e628d5dfdfee 100644
--- a/core/phpstan-baseline.neon
+++ b/core/phpstan-baseline.neon
@@ -2032,7 +2032,7 @@ parameters:
 
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
-			count: 3
+			count: 2
 			path: modules/search/tests/src/Functional/SearchRankingTest.php
 
 		-