X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FXmlTest.php;h=dbd1299ebd5d77ef4015b796dfc4a4f8a80107f2;hb=a29c7cdede96cb64fa929ff29488357c26f4e773;hp=bea338de7c4b1b8da00c378f2dd8f5689986bd67;hpb=8c087b9fd13d9302ec1be2176ef1ae344b3f8273;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/XmlTest.php b/tests/phpunit/includes/XmlTest.php index bea338de7c..dbd1299ebd 100644 --- a/tests/phpunit/includes/XmlTest.php +++ b/tests/phpunit/includes/XmlTest.php @@ -9,7 +9,7 @@ class XmlTest extends MediaWikiTestCase { parent::setUp(); $langObj = Language::factory( 'en' ); - $langObj->setNamespaces( array( + $langObj->setNamespaces( [ -2 => 'Media', -1 => 'Special', 0 => '', @@ -26,12 +26,12 @@ class XmlTest extends MediaWikiTestCase { 11 => 'Template_talk', 100 => 'Custom', 101 => 'Custom_talk', - ) ); + ] ); - $this->setMwGlobals( array( + $this->setMwGlobals( [ 'wgLang' => $langObj, - 'wgWellFormedXml' => true, - ) ); + 'wgUseMediaWikiUIEverywhere' => false, + ] ); } /** @@ -41,7 +41,7 @@ class XmlTest extends MediaWikiTestCase { $this->assertNull( Xml::expandAttributes( null ), 'Converting a null list of attributes' ); - $this->assertEquals( '', Xml::expandAttributes( array() ), + $this->assertEquals( '', Xml::expandAttributes( [] ), 'Converting an empty list of attributes' ); } @@ -113,7 +113,7 @@ class XmlTest extends MediaWikiTestCase { public function testElementAttributes() { $this->assertEquals( '="<>">', - Xml::element( 'element', array( 'key' => 'value', '<>' => '<>' ), null ), + Xml::element( 'element', [ 'key' => 'value', '<>' => '<>' ], null ), 'Element attributes, keys are not escaped' ); } @@ -124,7 +124,7 @@ class XmlTest extends MediaWikiTestCase { public function testOpenElement() { $this->assertEquals( '', - Xml::openElement( 'element', array( 'k' => 'v' ) ), + Xml::openElement( 'element', [ 'k' => 'v' ] ), 'openElement() shortcut' ); } @@ -152,7 +152,7 @@ class XmlTest extends MediaWikiTestCase { $this->assertEquals( ' ' . - ' ' . + ' ' . ' ' . ' ' . + ' ' . ' ' . ' ' . + ' ' . ' ' . '