mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-27 17:50:06 +00:00
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:
parent
881d0c2bbd
commit
16189b5866
|
@ -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' ],
|
||||||
|
|
|
@ -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 ],
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -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 ],
|
||||||
|
|
Loading…
Reference in a new issue