X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fspecialpage%2FSpecialPageFactoryTest.php;h=145ffb3547cc56bcf91189a94d7363befc5d9369;hb=19cd639835938da66507a1cc3623073c3217b416;hp=998d2bb335a5882a07ae8d36a8a5b825751526b9;hpb=f9d7d3b8561dab3ddfd8798a77a5b72e03ac8c2b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php b/tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php index 998d2bb335..145ffb3547 100644 --- a/tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php +++ b/tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php @@ -1,4 +1,6 @@ [ 'SpecialAllPages', false ], + 'class name' => [ 'SpecialAllPages' ], 'closure' => [ function () { return new SpecialAllPages(); - }, false ], - 'function' => [ [ $this, 'newSpecialAllPages' ], false ], - 'callback string' => [ 'SpecialPageTestHelper::newSpecialAllPages', false ], + } ], + 'function' => [ [ $this, 'newSpecialAllPages' ] ], + 'callback string' => [ 'SpecialPageTestHelper::newSpecialAllPages' ], 'callback with object' => [ - [ $specialPageTestHelper, 'newSpecialAllPages' ], - false + [ $specialPageTestHelper, 'newSpecialAllPages' ] ], 'callback array' => [ - [ 'SpecialPageTestHelper', 'newSpecialAllPages' ], - false + [ 'SpecialPageTestHelper', 'newSpecialAllPages' ] ] ]; } @@ -76,7 +76,7 @@ class SpecialPageFactoryTest extends MediaWikiTestCase { * @covers SpecialPageFactory::getPage * @dataProvider specialPageProvider */ - public function testGetPage( $spec, $shouldReuseInstance ) { + public function testGetPage( $spec ) { $this->mergeMwGlobalArrayValue( 'wgSpecialPages', [ 'testdummy' => $spec ] ); SpecialPageFactory::resetList(); @@ -84,7 +84,7 @@ class SpecialPageFactoryTest extends MediaWikiTestCase { $this->assertInstanceOf( 'SpecialPage', $page ); $page2 = SpecialPageFactory::getPage( 'testdummy' ); - $this->assertEquals( $shouldReuseInstance, $page2 === $page, "Should re-use instance:" ); + $this->assertEquals( true, $page2 === $page, "Should re-use instance:" ); } /** @@ -171,7 +171,7 @@ class SpecialPageFactoryTest extends MediaWikiTestCase { $gotWarnings = count( $warnings ); if ( $gotWarnings !== $expectWarnings ) { $this->fail( "Expected $expectWarnings warning(s), but got $gotWarnings:\n" . - join( "\n", $warnings ) + implode( "\n", $warnings ) ); } }