From 774610c0d4aa451f56ff09090c2a69ae8b78218b Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 21 Dec 2017 20:40:37 +0100 Subject: [PATCH] Check for IDatabase (not DatabaseBase) in tests Change-Id: Ia94fcae2a1dd28761b4e2f40fa1491f8401ad491 --- tests/phpunit/EchoDbFactoryTest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/EchoDbFactoryTest.php b/tests/phpunit/EchoDbFactoryTest.php index dc5379c3e..9180f84f2 100644 --- a/tests/phpunit/EchoDbFactoryTest.php +++ b/tests/phpunit/EchoDbFactoryTest.php @@ -1,5 +1,8 @@ assertInstanceOf( 'DatabaseBase', $db->getEchoDb( DB_MASTER ) ); - $this->assertInstanceOf( 'DatabaseBase', $db->getEchoDb( DB_REPLICA ) ); + $this->assertInstanceOf( IDatabase::class, $db->getEchoDb( DB_MASTER ) ); + $this->assertInstanceOf( IDatabase::class, $db->getEchoDb( DB_REPLICA ) ); } /** @@ -24,7 +27,7 @@ class MWEchoDbFactoryTest extends MediaWikiTestCase { $reflection = new ReflectionClass( 'MWEchoDbFactory' ); $method = $reflection->getMethod( 'getLB' ); $method->setAccessible( true ); - $this->assertInstanceOf( 'LoadBalancer', $method->invoke( $db ) ); + $this->assertInstanceOf( ILoadBalancer::class, $method->invoke( $db ) ); } }