From fb55b1eabe0a7febeeae33e30fec5d1ffaaaae83 Mon Sep 17 00:00:00 2001 From: Wandji69 Date: Thu, 27 Jun 2024 17:59:48 +0100 Subject: [PATCH] Tests: Replace "db" with getDb method Bug: T316841 Change-Id: Ied9f8d3a4d51a5f9eff5561a25e79a9b35ac2704 --- tests/phpunit/OATHAuthModuleRegistryTest.php | 2 +- tests/phpunit/integration/OATHUserRepositoryTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/OATHAuthModuleRegistryTest.php b/tests/phpunit/OATHAuthModuleRegistryTest.php index 30aae400..b951bf48 100644 --- a/tests/phpunit/OATHAuthModuleRegistryTest.php +++ b/tests/phpunit/OATHAuthModuleRegistryTest.php @@ -30,7 +30,7 @@ class OATHAuthModuleRegistryTest extends MediaWikiIntegrationTestCase { * @covers \MediaWiki\Extension\OATHAuth\OATHAuthModuleRegistry::getModuleIds */ public function testGetModuleIds() { - $this->db->newInsertQueryBuilder() + $this->getDb()->newInsertQueryBuilder() ->insertInto( 'oathauth_types' ) ->row( [ 'oat_name' => 'first' ] ) ->caller( __METHOD__ ) diff --git a/tests/phpunit/integration/OATHUserRepositoryTest.php b/tests/phpunit/integration/OATHUserRepositoryTest.php index 7f6dff0d..2ee02969 100644 --- a/tests/phpunit/integration/OATHUserRepositoryTest.php +++ b/tests/phpunit/integration/OATHUserRepositoryTest.php @@ -84,7 +84,7 @@ class OATHUserRepositoryTest extends MediaWikiIntegrationTestCase { ); $this->assertNotEmpty( - $this->db->newSelectQueryBuilder() + $this->getDb()->newSelectQueryBuilder() ->select( '1' ) ->from( 'oathauth_devices' ) ->where( [ 'oad_user' => $oathUser->getCentralId() ] )