aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/filerepo/file
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/filerepo/file
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/filerepo/file')
-rw-r--r--tests/phpunit/includes/filerepo/file/LocalFileTest.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/phpunit/includes/filerepo/file/LocalFileTest.php b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
index 1e5348c4f393..2f1d68cefa43 100644
--- a/tests/phpunit/includes/filerepo/file/LocalFileTest.php
+++ b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
@@ -636,8 +636,11 @@ class LocalFileTest extends MediaWikiIntegrationTestCase {
// Test cache by corrupting DB
// Don't wipe img_metadata though since that will be loaded by loadExtraFromDB()
- $dbw->update( 'image', [ 'img_size' => 0 ],
- [ 'img_name' => 'Random-11m.png' ], __METHOD__ );
+ $dbw->newUpdateQueryBuilder()
+ ->update( 'image' )
+ ->set( [ 'img_size' => 0 ] )
+ ->where( [ 'img_name' => 'Random-11m.png' ] )
+ ->caller( __METHOD__ )->execute();
$file = LocalFile::newFromTitle( $title, $repo );
$this->assertFileProperties( $expectedProps, $file );