Merge "AuthManager: Break AuthPlugin::addUser more explicitly"
[lhc/web/wiklou.git] / tests / phpunit / includes / specials / SpecialPreferencesTest.php
index 4f6c411..4a46464 100644 (file)
@@ -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( [] ) );
        }
 
 }