tests: Make PHPUnit data providers static

Initally used a new sniff with autofix (T333745)

Bug: T332865
Change-Id: I38462a30a3c739f1475bab07bd355c2e058e7110
This commit is contained in:
Umherirrender 2023-05-20 13:54:24 +02:00
parent f25f9ca861
commit a30fb4b54b

View file

@ -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 ],