aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php
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/api/query/ApiQuerySiteinfoTest.php
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/api/query/ApiQuerySiteinfoTest.php')
-rw-r--r--tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php b/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php
index 52ae188b60ca..3a7bfb6c0940 100644
--- a/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php
+++ b/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php
@@ -156,15 +156,15 @@ class ApiQuerySiteinfoTest extends ApiTestCase {
}
public function testSpecialPageAliases() {
- $this->assertCount(
- count( $this->getServiceContainer()->getSpecialPageFactory()->getNames() ),
+ $this->assertSameSize(
+ $this->getServiceContainer()->getSpecialPageFactory()->getNames(),
$this->doQuery( 'specialpagealiases' )
);
}
public function testMagicWords() {
- $this->assertCount(
- count( $this->getServiceContainer()->getContentLanguage()->getMagicWords() ),
+ $this->assertSameSize(
+ $this->getServiceContainer()->getContentLanguage()->getMagicWords(),
$this->doQuery( 'magicwords' )
);
}
@@ -181,8 +181,7 @@ class ApiQuerySiteinfoTest extends ApiTestCase {
MainConfigNames::ScriptPath => '/w',
] );
- $dbw = wfGetDB( DB_PRIMARY );
- $dbw->insert(
+ $this->getDb()->insert(
'interwiki',
[
[