Mercurial > hg > isophonics-drupal-site
diff core/modules/statistics/tests/src/Functional/StatisticsAdminTest.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/statistics/tests/src/Functional/StatisticsAdminTest.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php Thu May 09 15:33:08 2019 +0100 @@ -2,6 +2,7 @@ namespace Drupal\Tests\statistics\Functional; +use Drupal\Core\Database\Database; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\Traits\Core\CronRunTrait; @@ -115,7 +116,8 @@ $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics') . '/statistics.php'; $this->client->post($stats_path, ['form_params' => $post]); - $result = db_select('node_counter', 'n') + $connection = Database::getConnection(); + $result = $connection->select('node_counter', 'n') ->fields('n', ['nid']) ->condition('n.nid', $this->testNode->id()) ->execute() @@ -124,7 +126,7 @@ $this->testNode->delete(); - $result = db_select('node_counter', 'n') + $result = $connection->select('node_counter', 'n') ->fields('n', ['nid']) ->condition('n.nid', $this->testNode->id()) ->execute() @@ -162,7 +164,7 @@ $this->drupalGet('admin/reports/pages'); $this->assertNoText('node/' . $this->testNode->id(), 'No hit URL found.'); - $result = db_select('node_counter', 'nc') + $result = Database::getConnection()->select('node_counter', 'nc') ->fields('nc', ['daycount']) ->condition('nid', $this->testNode->id(), '=') ->execute()