From 0ecf36682f41e27bccbf0c32cf11e03a4e081528 Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Tue, 26 Jun 2012 18:02:29 -0700
Subject: [PATCH] Issue #1658164 by Rob Loach, Berdir: Fixed TableSort Class
 not found exception thrown in database_test_theme_tablesort().

---
 .../system/Tests/Database/SelectTableSortDefaultTest.php   | 7 +++++--
 .../tests/modules/database_test/database_test.module       | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php
index a50f38f95427..bf1e81f4c9d1 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php
@@ -79,7 +79,10 @@ function testTableSortQueryFirst() {
    */
   function testTableSortDefaultSort() {
     $this->drupalGet('database_test/tablesort_default_sort');
-    // Any PHP errors or notices thrown would trigger a simpletest exception, so
-    // no additional assertions are needed.
+
+    // Verify that the table was displayed. Just the header is checked for
+    // because if there were any fatal errors or exceptions in displaying the
+    // sorted table, it would not print the table.
+    $this->assertText(t('Username'));
   }
 }
diff --git a/core/modules/system/tests/modules/database_test/database_test.module b/core/modules/system/tests/modules/database_test/database_test.module
index 4500f741af50..d8428d8aab38 100644
--- a/core/modules/system/tests/modules/database_test/database_test.module
+++ b/core/modules/system/tests/modules/database_test/database_test.module
@@ -224,7 +224,7 @@ function database_test_theme_tablesort($form, &$form_state) {
 
   $query = $query
     ->extend('Drupal\Core\Database\Query\PagerSelectExtender')
-    ->extend('TableSort');
+    ->extend('Drupal\Core\Database\Query\TableSortExtender');
   $query
     ->fields('u', array('uid', 'name', 'status', 'created', 'access'))
     ->limit(50)
-- 
GitLab