Limit test leakage, $wgCapitalLinks expected to be true
[lhc/web/wiklou.git] / tests / phpunit / includes / title / MediaWikiTitleCodecTest.php
index e4f9396..2cf8663 100644 (file)
@@ -40,6 +40,7 @@ class MediaWikiTitleCodecTest extends MediaWikiTestCase {
                        'wgAllowUserJs' => false,
                        'wgDefaultLanguageVariant' => false,
                        'wgLocalInterwikis' => array( 'localtestiw' ),
+                       'wgCapitalLinks' => true,
 
                        // NOTE: this is why global state is evil.
                        // TODO: refactor access to the interwiki codes so it can be injected.
@@ -89,7 +90,14 @@ class MediaWikiTitleCodecTest extends MediaWikiTestCase {
                        array( NS_MAIN, 'Foo_Bar', '', 'en', 'Foo Bar' ),
                        array( NS_USER, 'Hansi_Maier', 'stuff_and_so_on', 'en', 'User:Hansi Maier#stuff and so on' ),
                        array( false, 'Hansi_Maier', '', 'en', 'Hansi Maier' ),
-                       array( NS_USER_TALK, 'hansi__maier', '', 'en', 'User talk:hansi  maier', 'User talk:Hansi maier' ),
+                       array(
+                               NS_USER_TALK,
+                               'hansi__maier',
+                               '',
+                               'en',
+                               'User talk:hansi  maier',
+                               'User talk:Hansi maier'
+                       ),
 
                        // getGenderCache() provides a mock that considers first
                        // names ending in "a" to be female.
@@ -112,7 +120,11 @@ class MediaWikiTitleCodecTest extends MediaWikiTestCase {
 
                // test round trip
                $parsed = $codec->parseTitle( $actual, NS_MAIN );
-               $actual2 = $codec->formatTitle( $parsed->getNamespace(), $parsed->getText(), $parsed->getFragment() );
+               $actual2 = $codec->formatTitle(
+                       $parsed->getNamespace(),
+                       $parsed->getText(),
+                       $parsed->getFragment()
+               );
 
                $this->assertEquals( $normalized, $actual2, 'normalized after round trip' );
        }
@@ -356,10 +368,10 @@ class MediaWikiTitleCodecTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideGetNamespaceName
         *
-        * @param $namespace
-        * @param $text
-        * @param $lang
-        * @param $expected
+        * @param int $namespace
+        * @param string $text
+        * @param string $lang
+        * @param string $expected
         *
         * @internal param \TitleValue $title
         */