aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2022-10-25 17:25:29 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2022-10-25 17:25:29 +0000
commit26c81a3f00eac55a54e073df6a4badfad6c26711 (patch)
treeecf13cf8776b3d854f0ead82e9695d5b50afa63d
parent8727e29f714a002c2ec0f338f88f5d451dd90007 (diff)
parent6005493b67d83ca4b22c42f92afc87d3945b5273 (diff)
downloadmediawikicore-26c81a3f00eac55a54e073df6a4badfad6c26711.tar.gz
mediawikicore-26c81a3f00eac55a54e073df6a4badfad6c26711.zip
Merge "tests: Replace deprecated WikiPage::factory in WikiCategoryPageTest"
-rw-r--r--tests/phpunit/includes/page/WikiCategoryPageTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/phpunit/includes/page/WikiCategoryPageTest.php b/tests/phpunit/includes/page/WikiCategoryPageTest.php
index cf865a9e0cb0..7f024bc446f5 100644
--- a/tests/phpunit/includes/page/WikiCategoryPageTest.php
+++ b/tests/phpunit/includes/page/WikiCategoryPageTest.php
@@ -7,7 +7,7 @@ class WikiCategoryPageTest extends MediaWikiLangTestCase {
*/
public function testHiddenCategory_PropertyNotSet() {
$title = Title::makeTitle( NS_CATEGORY, 'CategoryPage' );
- $categoryPage = WikiCategoryPage::factory( $title );
+ $categoryPage = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( $title );
$pageProps = $this->createMock( PageProps::class );
$pageProps->expects( $this->once() )
@@ -33,7 +33,7 @@ class WikiCategoryPageTest extends MediaWikiLangTestCase {
*/
public function testHiddenCategory_PropertyIsSet( $isHidden ) {
$categoryTitle = Title::makeTitle( NS_CATEGORY, 'CategoryPage' );
- $categoryPage = WikiCategoryPage::factory( $categoryTitle );
+ $categoryPage = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( $categoryTitle );
$pageProps = $this->createMock( PageProps::class );
$pageProps->expects( $this->once() )
@@ -51,7 +51,7 @@ class WikiCategoryPageTest extends MediaWikiLangTestCase {
*/
public function testExpectUnusedCategory_PropertyNotSet() {
$title = Title::makeTitle( NS_CATEGORY, 'CategoryPage' );
- $categoryPage = WikiCategoryPage::factory( $title );
+ $categoryPage = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( $title );
$pageProps = $this->createMock( PageProps::class );
$pageProps->expects( $this->once() )
@@ -70,7 +70,7 @@ class WikiCategoryPageTest extends MediaWikiLangTestCase {
*/
public function testExpectUnusedCategory_PropertyIsSet( $isExpectedUnusedCategory ) {
$categoryTitle = Title::makeTitle( NS_CATEGORY, 'CategoryPage' );
- $categoryPage = WikiCategoryPage::factory( $categoryTitle );
+ $categoryPage = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( $categoryTitle );
$returnValue = $isExpectedUnusedCategory ? [ $categoryTitle->getArticleID() => '' ] : [];
$pageProps = $this->createMock( PageProps::class );