diff options
Diffstat (limited to 'tests/phpunit/includes/specials/SpecialRecentchangesTest.php')
-rw-r--r-- | tests/phpunit/includes/specials/SpecialRecentchangesTest.php | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php index 2e4f4b09..436eb2e2 100644 --- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php +++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php @@ -14,9 +14,6 @@ class SpecialRecentchangesTest extends MediaWikiTestCase { */ protected $rc; - function setUp() { - } - /** helper to test SpecialRecentchanges::buildMainQueryConds() */ private function assertConditions( $expected, $requestOptions = null, $message = '' ) { $context = new RequestContext; @@ -44,8 +41,7 @@ class SpecialRecentchangesTest extends MediaWikiTestCase { /** return false if condition begin with 'rc_timestamp ' */ private static function filterOutRcTimestampCondition( $var ) { - return (false === strpos( $var, 'rc_timestamp ' )); - + return ( false === strpos( $var, 'rc_timestamp ' ) ); } public function testRcNsFilter() { @@ -73,7 +69,7 @@ class SpecialRecentchangesTest extends MediaWikiTestCase { 'namespace' => NS_MAIN, 'invert' => 1, ), - "rc conditions with namespace inverted" + "rc conditions with namespace inverted" ); } @@ -92,7 +88,7 @@ class SpecialRecentchangesTest extends MediaWikiTestCase { 'namespace' => $ns1, 'associated' => 1, ), - "rc conditions with namespace inverted" + "rc conditions with namespace inverted" ); } @@ -108,11 +104,11 @@ class SpecialRecentchangesTest extends MediaWikiTestCase { 1 => sprintf( "(rc_namespace != '%s' AND rc_namespace != '%s')", $ns1, $ns2 ), ), array( - 'namespace' => $ns1, + 'namespace' => $ns1, 'associated' => 1, - 'invert' => 1, + 'invert' => 1, ), - "rc conditions with namespace inverted" + "rc conditions with namespace inverted" ); } @@ -120,13 +116,10 @@ class SpecialRecentchangesTest extends MediaWikiTestCase { * Provides associated namespaces to test recent changes * namespaces association filtering. */ - public function provideNamespacesAssociations() { + public static function provideNamespacesAssociations() { return array( # (NS => Associated_NS) - array( NS_MAIN, NS_TALK), - array( NS_TALK, NS_MAIN), + array( NS_MAIN, NS_TALK ), + array( NS_TALK, NS_MAIN ), ); } - } - - |