diff core/modules/node/tests/src/Functional/NodeAccessLanguageTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
line wrap: on
line diff
--- a/core/modules/node/tests/src/Functional/NodeAccessLanguageTest.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/modules/node/tests/src/Functional/NodeAccessLanguageTest.php	Thu May 09 15:34:47 2019 +0100
@@ -2,6 +2,7 @@
 
 namespace Drupal\Tests\node\Functional;
 
+use Drupal\Core\Database\Database;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\node\Entity\NodeType;
@@ -201,9 +202,10 @@
     ]);
     $this->assertTrue($node_no_language->language()->getId() == LanguageInterface::LANGCODE_NOT_SPECIFIED, 'Node created with not specified language.');
 
+    $connection = Database::getConnection();
     // Query the nodes table as the web user with the node access tag and no
     // specific langcode.
-    $select = db_select('node', 'n')
+    $select = $connection->select('node', 'n')
       ->fields('n', ['nid'])
       ->addMetaData('account', $web_user)
       ->addTag('node_access');
@@ -217,7 +219,7 @@
 
     // Query the nodes table as the web user with the node access tag and
     // langcode de.
-    $select = db_select('node', 'n')
+    $select = $connection->select('node', 'n')
       ->fields('n', ['nid'])
       ->addMetaData('account', $web_user)
       ->addMetaData('langcode', 'de')
@@ -229,7 +231,7 @@
 
     // Query the nodes table as admin user (full access) with the node access
     // tag and no specific langcode.
-    $select = db_select('node', 'n')
+    $select = $connection->select('node', 'n')
       ->fields('n', ['nid'])
       ->addMetaData('account', $admin_user)
       ->addTag('node_access');
@@ -240,7 +242,7 @@
 
     // Query the nodes table as admin user (full access) with the node access
     // tag and langcode de.
-    $select = db_select('node', 'n')
+    $select = $connection->select('node', 'n')
       ->fields('n', ['nid'])
       ->addMetaData('account', $admin_user)
       ->addMetaData('langcode', 'de')