diff options
author | Wandji69 <collinschuwa@gmail.com> | 2024-06-13 17:53:25 +0100 |
---|---|---|
committer | Wandji69 <collinschuwa@gmail.com> | 2024-06-23 23:47:56 +0100 |
commit | c257e2276c8bbd57c85a516722eb047b3af2ebb9 (patch) | |
tree | bfa24e0f5f4d522744616c9c61979e00d96ac429 /tests/phpunit/includes/filerepo/file | |
parent | ed919c186be3598edf7df9f0adfe971f76f88908 (diff) | |
download | mediawikicore-c257e2276c8bbd57c85a516722eb047b3af2ebb9.tar.gz mediawikicore-c257e2276c8bbd57c85a516722eb047b3af2ebb9.zip |
Replace db with getDb for Tests
Bug: T316841
Change-Id: I29e535e8ee9b5641a4546d53b98cd5060d39681d
Diffstat (limited to 'tests/phpunit/includes/filerepo/file')
-rw-r--r-- | tests/phpunit/includes/filerepo/file/LocalFileTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/phpunit/includes/filerepo/file/LocalFileTest.php b/tests/phpunit/includes/filerepo/file/LocalFileTest.php index 5841d5df1884..7c0b70697fd9 100644 --- a/tests/phpunit/includes/filerepo/file/LocalFileTest.php +++ b/tests/phpunit/includes/filerepo/file/LocalFileTest.php @@ -333,7 +333,7 @@ class LocalFileTest extends MediaWikiIntegrationTestCase { UserIdentity $uploader, int $deletedFlags ): OldLocalFile { - $this->db->newInsertQueryBuilder() + $this->getDb()->newInsertQueryBuilder() ->insertInto( 'oldimage' ) ->row( [ 'oi_name' => 'Random-11m.png', @@ -348,11 +348,11 @@ class LocalFileTest extends MediaWikiIntegrationTestCase { 'oi_minor_mime' => 'png', 'oi_description_id' => $this->getServiceContainer() ->getCommentStore() - ->createComment( $this->db, 'comment' )->id, + ->createComment( $this->getDb(), 'comment' )->id, 'oi_actor' => $this->getServiceContainer() ->getActorStore() - ->acquireActorId( $uploader, $this->db ), - 'oi_timestamp' => $this->db->timestamp( '20201105235242' ), + ->acquireActorId( $uploader, $this->getDb() ), + 'oi_timestamp' => $this->getDb()->timestamp( '20201105235242' ), 'oi_sha1' => 'sy02psim0bgdh0jt4vdltuzoh7j80ru', 'oi_deleted' => $deletedFlags, ] ) @@ -387,13 +387,13 @@ class LocalFileTest extends MediaWikiIntegrationTestCase { 'fa_minor_mime' => 'png', 'fa_description_id' => $this->getServiceContainer() ->getCommentStore() - ->createComment( $this->db, 'comment' )->id, + ->createComment( $this->getDb(), 'comment' )->id, 'fa_actor' => $this->getServiceContainer() ->getActorStore() - ->acquireActorId( $uploader, $this->db ), + ->acquireActorId( $uploader, $this->getDb() ), 'fa_user' => $uploader->getId(), 'fa_user_text' => $uploader->getName(), - 'fa_timestamp' => $this->db->timestamp( '20201105235242' ), + 'fa_timestamp' => $this->getDb()->timestamp( '20201105235242' ), 'fa_sha1' => 'sy02psim0bgdh0jt4vdltuzoh7j80ru', 'fa_deleted' => $deletedFlags, ] |