diff core/modules/dblog/tests/src/Functional/DbLogResourceTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
line wrap: on
line diff
--- a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php	Thu May 09 15:34:47 2019 +0100
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\dblog\Functional;
 
 use Drupal\Component\Serialization\Json;
+use Drupal\Core\Database\Database;
 use Drupal\Core\Url;
 use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
 use Drupal\Tests\rest\Functional\ResourceTestBase;
@@ -58,7 +59,7 @@
     // Write a log message to the DB.
     $this->container->get('logger.channel.rest')->notice('Test message');
     // Get the ID of the written message.
-    $id = db_query_range("SELECT wid FROM {watchdog} WHERE type = :type ORDER BY wid DESC", 0, 1, [':type' => 'rest'])
+    $id = Database::getConnection()->queryRange("SELECT wid FROM {watchdog} WHERE type = :type ORDER BY wid DESC", 0, 1, [':type' => 'rest'])
       ->fetchField();
 
     $this->initAuthentication();