diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2022-10-25 17:25:29 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2022-10-25 17:25:29 +0000 |
commit | 26c81a3f00eac55a54e073df6a4badfad6c26711 (patch) | |
tree | ecf13cf8776b3d854f0ead82e9695d5b50afa63d | |
parent | 8727e29f714a002c2ec0f338f88f5d451dd90007 (diff) | |
parent | 6005493b67d83ca4b22c42f92afc87d3945b5273 (diff) | |
download | mediawikicore-26c81a3f00eac55a54e073df6a4badfad6c26711.tar.gz mediawikicore-26c81a3f00eac55a54e073df6a4badfad6c26711.zip |
Merge "tests: Replace deprecated WikiPage::factory in WikiCategoryPageTest"
-rw-r--r-- | tests/phpunit/includes/page/WikiCategoryPageTest.php | 8 |
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 ); |