aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/user/BotPasswordTest.php
diff options
context:
space:
mode:
authorAmir Sarabadani <ladsgroup@gmail.com>2023-09-25 20:49:16 +0200
committerAmir Sarabadani <ladsgroup@gmail.com>2023-09-25 21:08:09 +0200
commitcd2e19c050002f2ea1165d0fcccb3bb9ed1d7631 (patch)
treef7c22cf1bec4bb9221d3be40e8d7b95987b0f056 /tests/phpunit/includes/user/BotPasswordTest.php
parent60b986e6321785642a577d48f7d4e7d8b2a20893 (diff)
downloadmediawikicore-cd2e19c050002f2ea1165d0fcccb3bb9ed1d7631.tar.gz
mediawikicore-cd2e19c050002f2ea1165d0fcccb3bb9ed1d7631.zip
tests: Use $this->getDb() instead of wfGetDB() in integration tests
Deprecated long time ago. Bug: T330641 Change-Id: Ia57f12d350c3346029aafae25534c9ed262a7e98
Diffstat (limited to 'tests/phpunit/includes/user/BotPasswordTest.php')
-rw-r--r--tests/phpunit/includes/user/BotPasswordTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/includes/user/BotPasswordTest.php b/tests/phpunit/includes/user/BotPasswordTest.php
index 25f4156565b5..954ee59d3179 100644
--- a/tests/phpunit/includes/user/BotPasswordTest.php
+++ b/tests/phpunit/includes/user/BotPasswordTest.php
@@ -67,7 +67,7 @@ class BotPasswordTest extends MediaWikiIntegrationTestCase {
$passwordFactory = $this->getServiceContainer()->getPasswordFactory();
$passwordHash = $passwordFactory->newFromPlaintext( 'foobaz' );
- $dbw = wfGetDB( DB_PRIMARY );
+ $dbw = $this->getDb();
$dbw->newDeleteQueryBuilder()
->deleteFrom( 'bot_passwords' )
->where( [ 'bp_user' => [ 42, 43 ], 'bp_app_id' => 'BotPassword' ] )
@@ -194,7 +194,7 @@ class BotPasswordTest extends MediaWikiIntegrationTestCase {
$this->assertInstanceOf( InvalidPassword::class, $password );
$bp = TestingAccessWrapper::newFromObject( BotPassword::newFromCentralId( 42, 'BotPassword' ) );
- $dbw = wfGetDB( DB_PRIMARY );
+ $dbw = $this->getDb();
$dbw->newUpdateQueryBuilder()
->update( 'bot_passwords' )
->set( [ 'bp_password' => 'garbage' ] )