diff options
author | Amir Sarabadani <ladsgroup@gmail.com> | 2023-07-14 14:37:00 +0200 |
---|---|---|
committer | Amir Sarabadani <ladsgroup@gmail.com> | 2023-07-14 15:40:11 +0200 |
commit | 77342327ee23b4c02ddb1baa1fcdf0aa31862a2c (patch) | |
tree | 69180419370511b5faab86db3082f2972b58bb6a /tests/phpunit/includes/filerepo/file | |
parent | 5551326fa05cdff429cde8b048b0ec9973c4e9bd (diff) | |
download | mediawikicore-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.php | 7 |
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 ); |