aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/CommentStore/CommentStoreTest.php
diff options
context:
space:
mode:
authorWandji69 <collinschuwa@gmail.com>2024-06-13 17:53:25 +0100
committerWandji69 <collinschuwa@gmail.com>2024-06-23 23:47:56 +0100
commitc257e2276c8bbd57c85a516722eb047b3af2ebb9 (patch)
treebfa24e0f5f4d522744616c9c61979e00d96ac429 /tests/phpunit/includes/CommentStore/CommentStoreTest.php
parented919c186be3598edf7df9f0adfe971f76f88908 (diff)
downloadmediawikicore-c257e2276c8bbd57c85a516722eb047b3af2ebb9.tar.gz
mediawikicore-c257e2276c8bbd57c85a516722eb047b3af2ebb9.zip
Replace db with getDb for Tests
Bug: T316841 Change-Id: I29e535e8ee9b5641a4546d53b98cd5060d39681d
Diffstat (limited to 'tests/phpunit/includes/CommentStore/CommentStoreTest.php')
-rw-r--r--tests/phpunit/includes/CommentStore/CommentStoreTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/phpunit/includes/CommentStore/CommentStoreTest.php b/tests/phpunit/includes/CommentStore/CommentStoreTest.php
index 7590829e89e0..73f88bf56f2b 100644
--- a/tests/phpunit/includes/CommentStore/CommentStoreTest.php
+++ b/tests/phpunit/includes/CommentStore/CommentStoreTest.php
@@ -129,7 +129,7 @@ class CommentStoreTest extends MediaWikiLangTestCase {
$wstore = $this->makeStore();
- $fields = $wstore->insert( $this->db, $key, $comment, $data );
+ $fields = $wstore->insert( $this->getDb(), $key, $comment, $data );
$this->assertArrayNotHasKey( $key, $fields, "old field" );
$this->assertArrayHasKey( "{$key}_id", $fields, "new field" );
@@ -158,7 +158,7 @@ class CommentStoreTest extends MediaWikiLangTestCase {
$this->assertComment(
$expect,
- $rstore->getCommentLegacy( $this->db, $key, $fieldRow ),
+ $rstore->getCommentLegacy( $this->getDb(), $key, $fieldRow ),
"from getFields()"
);
$this->assertComment(
@@ -272,7 +272,7 @@ class CommentStoreTest extends MediaWikiLangTestCase {
$truncated = str_repeat( '💣', CommentStore::COMMENT_CHARACTER_LIMIT - 3 ) . '...';
$store = $this->makeStore();
- $fields = $store->insert( $this->db, 'ipb_reason', $comment );
+ $fields = $store->insert( $this->getDb(), 'ipb_reason', $comment );
$stored = $this->getDb()->newSelectQueryBuilder()
->select( 'comment_text' )
->from( 'comment' )
@@ -285,7 +285,7 @@ class CommentStoreTest extends MediaWikiLangTestCase {
$store = $this->makeStore();
$this->expectException( OverflowException::class );
$this->expectExceptionMessage( "Comment data is too long (65611 bytes, maximum is 65535)" );
- $store->insert( $this->db, 'ipb_reason', 'foo', [
+ $store->insert( $this->getDb(), 'ipb_reason', 'foo', [
'long' => str_repeat( '💣', 16400 )
] );
}