}
public static function dataIsSupportedFormat() {
- return array(
- array( null, true ),
- array( CONTENT_FORMAT_WIKITEXT, true ),
- array( 99887766, false ),
- );
+ return [
+ [ null, true ],
+ [ CONTENT_FORMAT_WIKITEXT, true ],
+ [ 99887766, false ],
+ ];
}
/**
}
public static function provideMakeRedirectContent() {
- return array(
- array( 'Hello', '#REDIRECT [[Hello]]' ),
- array( 'Template:Hello', '#REDIRECT [[Template:Hello]]' ),
- array( 'Hello#section', '#REDIRECT [[Hello#section]]' ),
- array( 'user:john_doe#section', '#REDIRECT [[User:John doe#section]]' ),
- array( 'MEDIAWIKI:FOOBAR', '#REDIRECT [[MediaWiki:FOOBAR]]' ),
- array( 'Category:Foo', '#REDIRECT [[:Category:Foo]]' ),
- array( Title::makeTitle( NS_MAIN, 'en:Foo' ), '#REDIRECT [[en:Foo]]' ),
- array( Title::makeTitle( NS_MAIN, 'Foo', '', 'en' ), '#REDIRECT [[:en:Foo]]' ),
- array(
+ return [
+ [ 'Hello', '#REDIRECT [[Hello]]' ],
+ [ 'Template:Hello', '#REDIRECT [[Template:Hello]]' ],
+ [ 'Hello#section', '#REDIRECT [[Hello#section]]' ],
+ [ 'user:john_doe#section', '#REDIRECT [[User:John doe#section]]' ],
+ [ 'MEDIAWIKI:FOOBAR', '#REDIRECT [[MediaWiki:FOOBAR]]' ],
+ [ 'Category:Foo', '#REDIRECT [[:Category:Foo]]' ],
+ [ Title::makeTitle( NS_MAIN, 'en:Foo' ), '#REDIRECT [[en:Foo]]' ],
+ [ Title::makeTitle( NS_MAIN, 'Foo', '', 'en' ), '#REDIRECT [[:en:Foo]]' ],
+ [
Title::makeTitle( NS_MAIN, 'Bar', 'fragment', 'google' ),
'#REDIRECT [[google:Bar#fragment]]'
- ),
- );
+ ],
+ ];
}
/**
}
public static function dataMerge3() {
- return array(
- array(
+ return [
+ [
"first paragraph
second paragraph\n",
"FIRST paragraph
SECOND paragraph\n",
- ),
+ ],
- array( "first paragraph
+ [ "first paragraph
second paragraph\n",
"Bla bla\n",
"Blubberdibla\n",
false,
- ),
- );
+ ],
+ ];
}
/**
* @covers WikitextContentHandler::merge3
*/
public function testMerge3( $old, $mine, $yours, $expected ) {
- $this->checkHasDiff3();
+ $this->markTestSkippedIfNoDiff3();
// test merge
$oldContent = new WikitextContent( $old );
}
public static function dataGetAutosummary() {
- return array(
- array(
+ return [
+ [
'Hello there, world!',
'#REDIRECT [[Foo]]',
0,
'/^Redirected page .*Foo/'
- ),
+ ],
- array(
+ [
null,
'Hello world!',
EDIT_NEW,
'/^Created page .*Hello/'
- ),
+ ],
- array(
+ [
'Hello there, world!',
'',
0,
'/^Blanked/'
- ),
+ ],
- array(
+ [
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
'Hello world!',
0,
'/^Replaced .*Hello/'
- ),
+ ],
- array(
+ [
'foo',
'bar',
0,
'/^$/'
- ),
- );
+ ],
+ ];
}
/**