diff core/modules/image/src/Tests/ImageFieldTestBase.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
line wrap: on
line diff
--- a/core/modules/image/src/Tests/ImageFieldTestBase.php	Thu Feb 28 13:21:36 2019 +0000
+++ b/core/modules/image/src/Tests/ImageFieldTestBase.php	Thu May 09 15:33:08 2019 +0100
@@ -109,7 +109,7 @@
    * Retrieves the fid of the last inserted file.
    */
   protected function getLastFileId() {
-    return (int) db_query('SELECT MAX(fid) FROM {file_managed}')->fetchField();
+    return (int) \Drupal::entityQueryAggregate('file')->aggregate('fid', 'max')->execute()[0]['fid_max'];
   }
 
 }