X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fspecials%2FSpecialPreferencesTest.php;h=4a46464d71feaa7deac50f164339ea5315fbf8f3;hb=d0e3551cda08caf3a0086f1ef8bbb3f0f991f520;hp=4f6c4116aa3fbbaa716cd0b8ea694a975edf6cbe;hpb=b2645d82849ca74b0e6b8df6a3e28e81d0561a58;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/specials/SpecialPreferencesTest.php b/tests/phpunit/includes/specials/SpecialPreferencesTest.php index 4f6c4116aa..4a46464d71 100644 --- a/tests/phpunit/includes/specials/SpecialPreferencesTest.php +++ b/tests/phpunit/includes/specials/SpecialPreferencesTest.php @@ -4,10 +4,11 @@ * * Copyright © 2013, Antoine Musso * Copyright © 2013, Wikimedia Foundation Inc. - * */ /** + * @group Database + * * @covers SpecialPreferences */ class SpecialPreferencesTest extends MediaWikiTestCase { @@ -32,14 +33,14 @@ class SpecialPreferencesTest extends MediaWikiTestCase { # Yeah foreach requires an array, not NULL =( $user->expects( $this->any() ) ->method( 'getEffectiveGroups' ) - ->will( $this->returnValue( array() ) ); + ->will( $this->returnValue( [] ) ); # The mocked user has a long nickname $user->expects( $this->any() ) ->method( 'getOption' ) - ->will( $this->returnValueMap( array( - array( 'nickname', null, false, 'superlongnickname' ), - ) + ->will( $this->returnValueMap( [ + [ 'nickname', null, false, 'superlongnickname' ], + ] ) ); # Forge a request to call the special page @@ -51,7 +52,7 @@ class SpecialPreferencesTest extends MediaWikiTestCase { # Do the call, should not spurt a fatal error. $special = new SpecialPreferences(); $special->setContext( $context ); - $this->assertNull( $special->execute( array() ) ); + $this->assertNull( $special->execute( [] ) ); } }