aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/filerepo/file
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/filerepo/file
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/filerepo/file')
-rw-r--r--tests/phpunit/includes/filerepo/file/LocalFileTest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/phpunit/includes/filerepo/file/LocalFileTest.php b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
index 2c8a7725fe44..ae71a6ba52ba 100644
--- a/tests/phpunit/includes/filerepo/file/LocalFileTest.php
+++ b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
@@ -561,7 +561,7 @@ class LocalFileTest extends MediaWikiIntegrationTestCase {
] )
);
- $dbw = wfGetDB( DB_PRIMARY );
+ $dbw = $this->getDb();
$norm = $services->getActorNormalization();
$user = $this->getTestSysop()->getUserIdentity();
$actorId = $norm->acquireActorId( $user, $dbw );
@@ -916,7 +916,7 @@ class LocalFileTest extends MediaWikiIntegrationTestCase {
* @dataProvider provideReserializeMetadata
*/
public function testReserializeMetadata( $input, $expected ) {
- $dbw = wfGetDB( DB_PRIMARY );
+ $dbw = $this->getDb();
$services = $this->getServiceContainer();
$norm = $services->getActorNormalization();
$user = $this->getTestSysop()->getUserIdentity();
@@ -990,7 +990,7 @@ class LocalFileTest extends MediaWikiIntegrationTestCase {
'containerPaths' => [ 'test-public' => __DIR__ . '/../../../data/media' ]
] )
] );
- $dbw = wfGetDB( DB_PRIMARY );
+ $dbw = $this->getDb();
$services = $this->getServiceContainer();
$norm = $services->getActorNormalization();
$user = $this->getTestSysop()->getUserIdentity();