dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "phpunit: Avoid use of deprecated getMock for PHPUnit 5 compat"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
specials
/
SpecialPreferencesTest.php
diff --git
a/tests/phpunit/includes/specials/SpecialPreferencesTest.php
b/tests/phpunit/includes/specials/SpecialPreferencesTest.php
index
1545d7e
..
fd587bf
100644
(file)
--- a/
tests/phpunit/includes/specials/SpecialPreferencesTest.php
+++ b/
tests/phpunit/includes/specials/SpecialPreferencesTest.php
@@
-25,7
+25,7
@@
class SpecialPreferencesTest extends MediaWikiTestCase {
// Set a low limit
$this->setMwGlobals( 'wgMaxSigChars', 2 );
// Set a low limit
$this->setMwGlobals( 'wgMaxSigChars', 2 );
- $user = $this->
get
Mock( 'User' );
+ $user = $this->
create
Mock( 'User' );
$user->expects( $this->any() )
->method( 'isAnon' )
->will( $this->returnValue( false ) );
$user->expects( $this->any() )
->method( 'isAnon' )
->will( $this->returnValue( false ) );
@@
-33,14
+33,14
@@
class SpecialPreferencesTest extends MediaWikiTestCase {
# Yeah foreach requires an array, not NULL =(
$user->expects( $this->any() )
->method( 'getEffectiveGroups' )
# 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' )
# 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
) );
# Forge a request to call the special page
@@
-52,7
+52,7
@@
class SpecialPreferencesTest extends MediaWikiTestCase {
# Do the call, should not spurt a fatal error.
$special = new SpecialPreferences();
$special->setContext( $context );
# Do the call, should not spurt a fatal error.
$special = new SpecialPreferences();
$special->setContext( $context );
- $this->assertNull( $special->execute(
array()
) );
+ $this->assertNull( $special->execute(
[]
) );
}
}
}
}