comparison core/modules/views/tests/src/Functional/ViewTestBase.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
1 <?php 1 <?php
2 2
3 namespace Drupal\Tests\views\Functional; 3 namespace Drupal\Tests\views\Functional;
4 4
5 use Behat\Mink\Exception\ElementNotFoundException; 5 use Behat\Mink\Exception\ElementNotFoundException;
6 use Drupal\Core\Database\Database;
6 use Drupal\Core\Database\Query\SelectInterface; 7 use Drupal\Core\Database\Query\SelectInterface;
7 use Drupal\Tests\BrowserTestBase; 8 use Drupal\Tests\BrowserTestBase;
8 use Drupal\views\Tests\ViewResultAssertionTrait; 9 use Drupal\views\Tests\ViewResultAssertionTrait;
9 use Drupal\views\Tests\ViewTestData; 10 use Drupal\views\Tests\ViewTestData;
10 use Drupal\views\ViewExecutable; 11 use Drupal\views\ViewExecutable;
53 $this->rebuildContainer(); 54 $this->rebuildContainer();
54 $this->container->get('module_handler')->reload(); 55 $this->container->get('module_handler')->reload();
55 56
56 // Load the test dataset. 57 // Load the test dataset.
57 $data_set = $this->dataSet(); 58 $data_set = $this->dataSet();
58 $query = db_insert('views_test_data') 59 $query = Database::getConnection()->insert('views_test_data')
59 ->fields(array_keys($data_set[0])); 60 ->fields(array_keys($data_set[0]));
60 foreach ($data_set as $record) { 61 foreach ($data_set as $record) {
61 $query->values($record); 62 $query->values($record);
62 } 63 }
63 $query->execute(); 64 $query->execute();