Add support for extra database connections in unit tests.
authordaniel <daniel.kinzler@wikimedia.de>
Wed, 4 Jul 2018 15:20:31 +0000 (17:20 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Wed, 4 Jul 2018 17:07:45 +0000 (19:07 +0200)
commit6cfdbdf60e69cce31d2f28f0a0e7e478785fe886
treee0bfd5aa8d44c5dc7c231c0138c980ae4ca0bb03
parent7c31dc8870851774a471e18f44c790556e9b508d
Add support for extra database connections in unit tests.

This adds a way to take any connection to the wiki database and
allow it to be used for unit tests.

This is needed to test code that requires two independent DB
connections, to the same database or to a different wiki's database.

Change-Id: I0b84a0c4d174cbde830786028ee7568c4ea9fb5d
includes/db/CloneDatabase.php
tests/phpunit/MediaWikiTestCase.php