aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/user/BotPasswordTest.php
diff options
context:
space:
mode:
authorAmir Sarabadani <ladsgroup@gmail.com>2023-07-14 14:37:00 +0200
committerAmir Sarabadani <ladsgroup@gmail.com>2023-07-14 15:40:11 +0200
commit77342327ee23b4c02ddb1baa1fcdf0aa31862a2c (patch)
tree69180419370511b5faab86db3082f2972b58bb6a /tests/phpunit/includes/user/BotPasswordTest.php
parent5551326fa05cdff429cde8b048b0ec9973c4e9bd (diff)
downloadmediawikicore-77342327ee23b4c02ddb1baa1fcdf0aa31862a2c.tar.gz
mediawikicore-77342327ee23b4c02ddb1baa1fcdf0aa31862a2c.zip
tests: Migrate calls to Database::update to UpdateQueryBuilder
Bug: T330640 Change-Id: I30f9e84658fbd996b5512e96dda3f6412ebf3a20
Diffstat (limited to 'tests/phpunit/includes/user/BotPasswordTest.php')
-rw-r--r--tests/phpunit/includes/user/BotPasswordTest.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/phpunit/includes/user/BotPasswordTest.php b/tests/phpunit/includes/user/BotPasswordTest.php
index db89b9af0b5b..822bb84e6c24 100644
--- a/tests/phpunit/includes/user/BotPasswordTest.php
+++ b/tests/phpunit/includes/user/BotPasswordTest.php
@@ -190,12 +190,11 @@ class BotPasswordTest extends MediaWikiIntegrationTestCase {
$bp = TestingAccessWrapper::newFromObject( BotPassword::newFromCentralId( 42, 'BotPassword' ) );
$dbw = wfGetDB( DB_PRIMARY );
- $dbw->update(
- 'bot_passwords',
- [ 'bp_password' => 'garbage' ],
- [ 'bp_user' => 42, 'bp_app_id' => 'BotPassword' ],
- __METHOD__
- );
+ $dbw->newUpdateQueryBuilder()
+ ->update( 'bot_passwords' )
+ ->set( [ 'bp_password' => 'garbage' ] )
+ ->where( [ 'bp_user' => 42, 'bp_app_id' => 'BotPassword' ] )
+ ->caller( __METHOD__ )->execute();
$password = $bp->getPassword();
$this->assertInstanceOf( InvalidPassword::class, $password );
}