rdbms: Refactor DatabaseTest
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 20 Jul 2017 20:17:11 +0000 (13:17 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 21 Jul 2017 01:23:37 +0000 (18:23 -0700)
commitddb7575e4ec22ce3a4cdd0917deb9f4f3403613a
tree13f273852f1237f59f2978f472037c216fb695ad
parentb857284f710c48ea5fbdbe69981471383faaecf2
rdbms: Refactor DatabaseTest

* Move DatabaseTest and DatabaseSQLTest to libs,
  and remove MediaWikiTestCase dependency.

* Refactor DatabaseTest to be a test of the Database abstract class,
  not of whatever current DB backend is configured by LocalSettings.

  - Remove most switches/conditionals and other tests for specific
    database backends. Move those to individual test classes for
    those backends instead.
  - Some tests appear to have been integration tests for the PHP driver
    and/or the db backend itself. Moved to a new DatabaseIntegrationTest.
  - Now that only the abstract Database is invoked, the test runs a bit
    faster (no real connections/queries).

* Add missing @covers tags, and remove or fix broken ones
  (follows-up 26e52f0c491a4).

Change-Id: I9dc4a558e701d00e95789e7eb8e02926783b65ad
tests/phpunit/includes/db/DatabaseSQLTest.php [deleted file]
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/db/DatabaseTest.php [deleted file]
tests/phpunit/includes/libs/rdbms/database/DatabaseMysqlBaseTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php [new file with mode: 0644]
tests/phpunit/structure/DatabaseIntegrationTest.php [new file with mode: 0644]