tests: Make some PHPUnit data providers static

Initally used a new sniff with autofix (T333745)

Bug: T332865
Change-Id: Ia50628faba21eeb30a08f11823825dce9bb71db2
This commit is contained in:
Umherirrender 2023-05-20 19:35:54 +02:00
parent 881d0c2bbd
commit 16189b5866
4 changed files with 4 additions and 4 deletions

View file

@ -702,7 +702,7 @@ class LuaCommonTest extends LuaEngineTestBase {
$this->assertEquals( '1 2', $text, "Volatile wikitext was not cached" ); $this->assertEquals( '1 2', $text, "Volatile wikitext was not cached" );
} }
public function provideVolatileCaching() { public static function provideVolatileCaching() {
return [ return [
[ 'preprocess' ], [ 'preprocess' ],
[ 'extensionTag' ], [ 'extensionTag' ],

View file

@ -100,7 +100,7 @@ abstract class LuaInterpreterTest extends TestCase {
return $args; return $args;
} }
public function provideRoundtrip() { public static function provideRoundtrip() {
return [ return [
[ 1 ], [ 1 ],
[ true ], [ true ],

View file

@ -213,7 +213,7 @@ class TitleLibraryTest extends LuaEngineTestBase {
$this->assertSame( $flag, $engine->getParser()->getOutput()->getOutputFlag( ParserOutputFlags::VARY_PAGE_ID ) ); $this->assertSame( $flag, $engine->getParser()->getOutput()->getOutputFlag( ParserOutputFlags::VARY_PAGE_ID ) );
} }
public function provideVaryPageId() { public static function provideVaryPageId() {
return [ return [
'by getCurrentTitle()' => [ 'by getCurrentTitle()' => [
'ScribuntoTestPage', 'ScribuntoTestPage',

View file

@ -13,7 +13,7 @@ use Title;
class HooksTest extends TestCase { class HooksTest extends TestCase {
use MediaWikiCoversValidator; use MediaWikiCoversValidator;
public function provideContentHandlerDefaultModelFor() { public static function provideContentHandlerDefaultModelFor() {
return [ return [
[ 'Module:Foo', CONTENT_MODEL_SCRIBUNTO, true ], [ 'Module:Foo', CONTENT_MODEL_SCRIBUNTO, true ],
[ 'Module:Foo/doc', null, true ], [ 'Module:Foo/doc', null, true ],