Commit 6aed5822 authored by alexpott's avatar alexpott

Issue #2680105 by Berdir: Convert database kernel tests to phpunit

parent bf1a1949
......@@ -7,6 +7,7 @@
namespace Drupal\system\Tests\Database;
use Drupal\KernelTests\Core\Database\DatabaseTestBase;
use Drupal\simpletest\WebTestBase;
/**
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\AlterTest.
* Contains \Drupal\KernelTests\Core\Database\AlterTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the hook_query_alter capabilities of the Select builder.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\BasicSyntaxTest.
* Contains \Drupal\KernelTests\Core\Database\BasicSyntaxTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests SQL syntax interpretation.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\CaseSensitivityTest.
* Contains \Drupal\KernelTests\Core\Database\CaseSensitivityTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests handling case sensitive collation.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\ConnectionTest.
* Contains \Drupal\KernelTests\Core\Database\ConnectionTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\DatabaseExceptionWrapper;
......
......@@ -2,13 +2,13 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\ConnectionUnitTest.
* Contains \Drupal\KernelTests\Core\Database\ConnectionUnitTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests management of database connections.
......
......@@ -2,14 +2,14 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\DatabaseExceptionWrapperTest.
* Contains \Drupal\KernelTests\Core\Database\DatabaseExceptionWrapperTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\DatabaseExceptionWrapper;
use Drupal\Core\Database\Database;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests exceptions thrown by queries.
......
......@@ -2,12 +2,12 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\DatabaseTestBase.
* Contains \Drupal\KernelTests\Core\Database\DatabaseTestBase.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**
* Base class for databases database tests.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\DeleteTruncateTest.
* Contains \Drupal\KernelTests\Core\Database\DeleteTruncateTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests delete and truncate queries.
......
......@@ -2,13 +2,14 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\FetchTest.
* Contains \Drupal\KernelTests\Core\Database\FetchTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\RowCountException;
use Drupal\Core\Database\StatementInterface;
use Drupal\system\Tests\Database\FakeRecord;
/**
* Tests the Database system's various fetch capabilities.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\InsertDefaultsTest.
* Contains \Drupal\KernelTests\Core\Database\InsertDefaultsTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Query\NoFieldsException;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\InsertLobTest.
* Contains \Drupal\KernelTests\Core\Database\InsertLobTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the Insert query builder with LOB fields.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\InsertTest.
* Contains \Drupal\KernelTests\Core\Database\InsertTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the insert builder.
......
......@@ -2,11 +2,12 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\InvalidDataTest.
* Contains \Drupal\KernelTests\Core\Database\InvalidDataTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\IntegrityConstraintViolationException;
/**
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\LargeQueryTest.
* Contains \Drupal\KernelTests\Core\Database\LargeQueryTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Component\Utility\Environment;
use Drupal\Core\Database\Database;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\LoggingTest.
* Contains \Drupal\KernelTests\Core\Database\LoggingTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\MergeTest.
* Contains \Drupal\KernelTests\Core\Database\MergeTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Query\Merge;
use Drupal\Core\Database\Query\InvalidMergeQueryException;
......
......@@ -2,12 +2,12 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\NextIdTest.
* Contains \Drupal\KernelTests\Core\Database\NextIdTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests the sequences API.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\QueryTest.
* Contains \Drupal\KernelTests\Core\Database\QueryTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests Drupal's extended prepared statement syntax..
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\RangeQueryTest.
* Contains \Drupal\KernelTests\Core\Database\RangeQueryTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the Range query functionality.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\RegressionTest.
* Contains \Drupal\KernelTests\Core\Database\RegressionTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Regression tests cases for the database layer.
......
......@@ -2,16 +2,16 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\SchemaTest.
* Contains \Drupal\KernelTests\Core\Database\SchemaTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\SchemaException;
use Drupal\Core\Database\SchemaObjectDoesNotExistException;
use Drupal\Core\Database\SchemaObjectExistsException;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
use Drupal\Component\Utility\Unicode;
/**
......@@ -771,7 +771,7 @@ public function testFindTables() {
sort($tables);
$expected = [
// The 'config' table is added by
// \Drupal\simpletest\KernelTestBase::containerBuild().
// \Drupal\KernelTests\KernelTestBase::containerBuild().
'config',
'test_1_table',
// This table uses a per-table prefix, yet it is returned as un-prefixed.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\SelectCloneTest.
* Contains \Drupal\KernelTests\Core\Database\SelectCloneTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests cloning Select queries.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\SelectComplexTest.
* Contains \Drupal\KernelTests\Core\Database\SelectComplexTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\RowCountException;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\SelectOrderedTest.
* Contains \Drupal\KernelTests\Core\Database\SelectOrderedTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the Select query builder.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\SelectSubqueryTest.
* Contains \Drupal\KernelTests\Core\Database\SelectSubqueryTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the Select query builder.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\SelectTest.
* Contains \Drupal\KernelTests\Core\Database\SelectTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\InvalidQueryException;
use Drupal\Core\Database\Database;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\SerializeQueryTest.
* Contains \Drupal\KernelTests\Core\Database\SerializeQueryTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests serializing and unserializing a query.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\TaggingTest.
* Contains \Drupal\KernelTests\Core\Database\TaggingTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the tagging capabilities of the Select builder.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\TransactionTest.
* Contains \Drupal\KernelTests\Core\Database\TransactionTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\TransactionOutOfOrderException;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\UpdateComplexTest.
* Contains \Drupal\KernelTests\Core\Database\UpdateComplexTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the Update query builder, complex queries.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\UpdateLobTest.
* Contains \Drupal\KernelTests\Core\Database\UpdateLobTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the Update query builder with LOB fields.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\UpdateTest.
* Contains \Drupal\KernelTests\Core\Database\UpdateTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
/**
* Tests the update query builder.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\system\Tests\Database\UpsertTest.
* Contains \Drupal\KernelTests\Core\Database\UpsertTest.
*/
namespace Drupal\system\Tests\Database;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
......
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