Merge "Change Special:ChangePassword to use OOUI"
[lhc/web/wiklou.git] / tests / phpunit / includes / content / JavaScriptContentTest.php
index 898fa53..a636e56 100644 (file)
@@ -116,10 +116,12 @@ class JavaScriptContentTest extends TextContentTest {
 
        public static function dataPreloadTransform() {
                return array(
-                       array( 'hello this is ~~~',
+                       array(
+                               'hello this is ~~~',
                                'hello this is ~~~',
                        ),
-                       array( 'hello \'\'this\'\' is <noinclude>foo</noinclude><includeonly>bar</includeonly>',
+                       array(
+                               'hello \'\'this\'\' is <noinclude>foo</noinclude><includeonly>bar</includeonly>',
                                'hello \'\'this\'\' is <noinclude>foo</noinclude><includeonly>bar</includeonly>',
                        ),
                );
@@ -256,7 +258,9 @@ class JavaScriptContentTest extends TextContentTest {
        public function testUpdateRedirect( $oldText, $expectedText ) {
                $this->setMwGlobals( array(
                        'wgServer' => '//example.org',
-                       'wgScriptPath' => '/w/index.php',
+                       'wgScriptPath' => '/w',
+                       'wgScript' => '/w/index.php',
+                       'wgResourceBasePath' => '/w',
                ) );
                $target = Title::newFromText( "testUpdateRedirect_target" );
 
@@ -272,10 +276,13 @@ class JavaScriptContentTest extends TextContentTest {
                                '#REDIRECT [[Someplace]]',
                                '#REDIRECT [[Someplace]]',
                        ),
+
+                       // @codingStandardsIgnoreStart Generic.Files.LineLength
                        array(
                                '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=MediaWiki:MonoBook.js\u0026action=raw\u0026ctype=text/javascript");',
                                '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=TestUpdateRedirect_target\u0026action=raw\u0026ctype=text/javascript");'
                        )
+                       // @codingStandardsIgnoreEnd
                );
        }
 
@@ -312,7 +319,9 @@ class JavaScriptContentTest extends TextContentTest {
        public function testGetRedirectTarget( $title, $text ) {
                $this->setMwGlobals( array(
                        'wgServer' => '//example.org',
-                       'wgScriptPath' => '/w/index.php',
+                       'wgScriptPath' => '/w',
+                       'wgScript' => '/w/index.php',
+                       'wgResourceBasePath' => '/w',
                ) );
                $content = new JavaScriptContent( $text );
                $target = $content->getRedirectTarget();
@@ -323,6 +332,7 @@ class JavaScriptContentTest extends TextContentTest {
         * Keep this in sync with JavaScriptContentHandlerTest::provideMakeRedirectContent()
         */
        public static function provideGetRedirectTarget() {
+               // @codingStandardsIgnoreStart Generic.Files.LineLength
                return array(
                        array( 'MediaWiki:MonoBook.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=MediaWiki:MonoBook.js\u0026action=raw\u0026ctype=text/javascript");' ),
                        array( 'User:FooBar/common.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=User:FooBar/common.js\u0026action=raw\u0026ctype=text/javascript");' ),
@@ -332,5 +342,6 @@ class JavaScriptContentTest extends TextContentTest {
                        // Different domain
                        array( null, '/* #REDIRECT */mw.loader.load("//example.com/w/index.php?title=MediaWiki:OtherWiki.js\u0026action=raw\u0026ctype=text/javascript");' ),
                );
+               // @codingStandardsIgnoreEnd
        }
 }