Commit 3093a670 authored by Crell's avatar Crell
Browse files

Add more use statements.

parent 13e82d2e
......@@ -3,6 +3,7 @@
namespace Drupal\Database\Driver\mysql;
use Drupal\Database\Database;
use Drupal\Database\DatabaseTransactionCommitFailedException;
use Drupal\Database\Connection as DatabaseConnection;
use PDO;
......
......@@ -3,6 +3,8 @@
namespace Drupal\Database\Query;
use Drupal\Database\Database;
use Drupal\Database\NoFieldsException;
use Drupal\Database\FieldsOverlapException;
/**
* General class for an abstracted INSERT query.
......
......@@ -4,6 +4,8 @@
use Drupal\Database\Database;
use Drupal\Database\Connection;
use Drupal\Database\InvalidMergeQueryException;
use Exception;
/**
......
<?php
use Drupal\Database\Query\SelectExtender;
use Drupal\Database\DatabaseStatementEmpty;
/**
* @file
* Search query extender and helper functions.
......@@ -24,7 +27,7 @@
* The used query object has the tag 'search_$module' and can be further
* extended with hook_query_alter().
*/
class SearchQuery extends SelectQueryExtender {
class SearchQuery extends SelectExtender {
/**
* The search query that is used for searching.
*
......
<?php
use Drupal\Database\Database;
use Drupal\Database\DatabaseConnectionNotDefinedException;
/**
* Global variable that holds information about the tests being run.
......
<?php
use Drupal\Database\Database;
use Drupal\Database\DatabaseStatementEmpty;
use Drupal\Database\DatabaseStatementInterface;
use Drupal\Database\NoFieldsException;
use Drupal\Database\InvalidMergeQueryException;
use Drupal\Database\Query\Merge;
/**
* Dummy class for fetching into a class.
......@@ -1091,7 +1096,7 @@ class DatabaseMergeTestCase extends DatabaseTestCase {
))
->execute();
$this->assertEqual($result, MergeQuery::STATUS_INSERT, t('Insert status returned.'));
$this->assertEqual($result, Merge::STATUS_INSERT, t('Insert status returned.'));
$num_records_after = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField();
$this->assertEqual($num_records_before + 1, $num_records_after, t('Merge inserted properly.'));
......@@ -1116,7 +1121,7 @@ class DatabaseMergeTestCase extends DatabaseTestCase {
))
->execute();
$this->assertEqual($result, MergeQuery::STATUS_UPDATE, t('Update status returned.'));
$this->assertEqual($result, Merge::STATUS_UPDATE, t('Update status returned.'));
$num_records_after = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField();
$this->assertEqual($num_records_before, $num_records_after, t('Merge updated properly.'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment