aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/filerepo/file
diff options
context:
space:
mode:
authorAmir Sarabadani <ladsgroup@gmail.com>2023-07-14 14:48:42 +0200
committerAmir Sarabadani <ladsgroup@gmail.com>2023-07-14 14:48:42 +0200
commit614cd4150761fd804c256e52a285169c002e558d (patch)
treec226ff0931ee6bbf6348fbbe4b4ffe90533aef49 /tests/phpunit/includes/filerepo/file
parentbffa95de81d5dbf7d6e6504d6338f8dbe2d036b7 (diff)
downloadmediawikicore-614cd4150761fd804c256e52a285169c002e558d.tar.gz
mediawikicore-614cd4150761fd804c256e52a285169c002e558d.zip
tests: Migrate Database::delete calls to DeleteQueryBuilder
Bug: T340065 Change-Id: I92e85efd5d23d100a5df38aedb8edaecc5cbfc65
Diffstat (limited to 'tests/phpunit/includes/filerepo/file')
-rw-r--r--tests/phpunit/includes/filerepo/file/LocalFileTest.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/phpunit/includes/filerepo/file/LocalFileTest.php b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
index 7b9a8985be9e..1e5348c4f393 100644
--- a/tests/phpunit/includes/filerepo/file/LocalFileTest.php
+++ b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
@@ -650,7 +650,10 @@ class LocalFileTest extends MediaWikiIntegrationTestCase {
$this->assertTrue( $user->equals( $file->getUploader() ) );
// Make sure we were actually hitting the WAN cache
- $dbw->delete( 'image', [ 'img_name' => 'Random-11m.png' ], __METHOD__ );
+ $dbw->newDeleteQueryBuilder()
+ ->delete( 'image' )
+ ->where( [ 'img_name' => 'Random-11m.png' ] )
+ ->caller( __METHOD__ )->execute();
$file->invalidateCache();
$file = LocalFile::newFromTitle( $title, $repo );
$this->assertSame( false, $file->exists() );