*
* Copyright © 2013, Antoine Musso
* Copyright © 2013, Wikimedia Foundation Inc.
- *
*/
/**
+ * @group Database
+ *
* @covers SpecialPreferences
*/
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
# Do the call, should not spurt a fatal error.
$special = new SpecialPreferences();
$special->setContext( $context );
- $this->assertNull( $special->execute( array() ) );
+ $this->assertNull( $special->execute( [] ) );
}
}