mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ParserFunctions
synced 2024-11-23 15:57:10 +00:00
tests: Make PHPUnit data providers static
Initally used a new sniff with autofix (T333745) Bug: T332865 Change-Id: I38462a30a3c739f1475bab07bd355c2e058e7110
This commit is contained in:
parent
f25f9ca861
commit
a30fb4b54b
|
@ -20,7 +20,7 @@ class ExpressionTest extends MediaWikiUnitTestCase {
|
|||
);
|
||||
}
|
||||
|
||||
public function provideExpressions() {
|
||||
public static function provideExpressions() {
|
||||
return [
|
||||
[ '1 or 0', '1' ],
|
||||
[ 'not (1 and 0)', '1' ],
|
||||
|
@ -90,7 +90,7 @@ class ExpressionTest extends MediaWikiUnitTestCase {
|
|||
$parser->doExpression( $input );
|
||||
}
|
||||
|
||||
public function provideExpressionThrows() {
|
||||
public static function provideExpressionThrows() {
|
||||
$longExpression = str_repeat( 'ln(', 1001 ) . '1' . str_repeat( ')', 1001 );
|
||||
return [
|
||||
'Expression too long' => [ $longExpression ],
|
||||
|
|
Loading…
Reference in a new issue