X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FTemplateCategoriesTest.php;h=ab2313635da395aa67df22a1bb3439e1ba1f3641;hb=125f9e1ab4cc50c5b7ca8b232f5035608b3dc798;hp=b0d17267a056efe1ff34591ab966df933dbf02ab;hpb=665f171a18061aacd339102a21f32d714c5de50d;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/TemplateCategoriesTest.php b/tests/phpunit/includes/TemplateCategoriesTest.php index b0d17267a0..ab2313635d 100644 --- a/tests/phpunit/includes/TemplateCategoriesTest.php +++ b/tests/phpunit/includes/TemplateCategoriesTest.php @@ -8,11 +8,14 @@ require __DIR__ . "/../../../maintenance/runJobs.php"; class TemplateCategoriesTest extends MediaWikiLangTestCase { /** + * Broken per T165099. + * + * @group Broken * @covers Title::getParentCategories */ public function testTemplateCategories() { $user = new User(); - $user->mRights = array( 'createpage', 'edit', 'purge', 'delete' ); + $user->mRights = [ 'createpage', 'edit', 'purge', 'delete' ]; $title = Title::newFromText( "Categorized from template" ); $page = WikiPage::factory( $title ); @@ -25,7 +28,7 @@ class TemplateCategoriesTest extends MediaWikiLangTestCase { ); $this->assertEquals( - array(), + [], $title->getParentCategories(), 'Verify that the category doesn\'t contain the page before the template is created' ); @@ -43,12 +46,12 @@ class TemplateCategoriesTest extends MediaWikiLangTestCase { // Run the job queue JobQueueGroup::destroySingletons(); $jobs = new RunJobs; - $jobs->loadParamsAndArgs( null, array( 'quiet' => true ), null ); + $jobs->loadParamsAndArgs( null, [ 'quiet' => true ], null ); $jobs->execute(); // Make sure page is in the category $this->assertEquals( - array( 'Category:Solved_bugs' => $title->getPrefixedText() ), + [ 'Category:Solved_bugs' => $title->getPrefixedText() ], $title->getParentCategories(), 'Verify that the page is in the category after the template is created' ); @@ -65,12 +68,12 @@ class TemplateCategoriesTest extends MediaWikiLangTestCase { // Run the job queue JobQueueGroup::destroySingletons(); $jobs = new RunJobs; - $jobs->loadParamsAndArgs( null, array( 'quiet' => true ), null ); + $jobs->loadParamsAndArgs( null, [ 'quiet' => true ], null ); $jobs->execute(); // Make sure page is in the right category $this->assertEquals( - array( 'Category:Solved_bugs_2' => $title->getPrefixedText() ), + [ 'Category:Solved_bugs_2' => $title->getPrefixedText() ], $title->getParentCategories(), 'Verify that the page is in the right category after the template is edited' ); @@ -82,15 +85,14 @@ class TemplateCategoriesTest extends MediaWikiLangTestCase { // Run the job queue JobQueueGroup::destroySingletons(); $jobs = new RunJobs; - $jobs->loadParamsAndArgs( null, array( 'quiet' => true ), null ); + $jobs->loadParamsAndArgs( null, [ 'quiet' => true ], null ); $jobs->execute(); // Make sure the page is no longer in the category $this->assertEquals( - array(), + [], $title->getParentCategories(), 'Verify that the page is no longer in the category after template deletion' ); - } }