JSDuck-ify /resources/mediawiki.language/*
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki / mediawiki.jqueryMsg.test.js
index e0e823d..6e13e13 100644 (file)
@@ -10,8 +10,7 @@
 
        QUnit.module( 'mediawiki.jqueryMsg', QUnit.newMwEnvironment( {
                setup: function () {
-                       this.orgMwLangauge = mw.language;
-                       mw.language = $.extend( true, {}, this.orgMwLangauge );
+                       this.originalMwLanguage = mw.language;
 
                        // Messages that are reused in multiple tests
                        mw.messages.set( {
@@ -55,7 +54,7 @@
                        } );
                },
                teardown: function () {
-                       mw.language = this.orgMwLangauge;
+                       mw.language = this.originalMwLanguage;
                }
        } ) );
 
@@ -554,7 +553,7 @@ QUnit.test( 'formatnum', formatnumTests.length, function ( assert ) {
                                return;
                        }
                        mw.messages.set(test.message );
-                       mw.config.set( 'wgUserLanguage', test.lang ) ;
+                       mw.config.set( 'wgUserLanguage', test.lang );
                        var parser = new mw.jqueryMsg.parser( { language: langClass } );
                        assert.equal(
                                parser.parse( test.integer ? 'formatnum-msg-int' : 'formatnum-msg',
@@ -585,7 +584,7 @@ QUnit.test( 'HTML', 26, function ( assert ) {
 
        assert.htmlEqual(
                formatParse( 'jquerymsg-italics-with-link' ),
-               'An <i>italicized <a title="link" href="' + mw.html.escape( mw.util.wikiGetlink( 'link' ) ) + '">wiki-link</i>',
+               'An <i>italicized <a title="link" href="' + mw.html.escape( mw.util.getUrl( 'link' ) ) + '">wiki-link</i>',
                'Italics with link inside in parse mode'
        );
 
@@ -625,7 +624,7 @@ QUnit.test( 'HTML', 26, function ( assert ) {
        mw.messages.set( 'jquerymsg-script-link-msg', '<script>[[Foo|bar]]</script>' );
        assert.htmlEqual(
                formatParse( 'jquerymsg-script-link-msg' ),
-               '&lt;script&gt;<a title="Foo" href="' + mw.html.escape( mw.util.wikiGetlink( 'Foo' ) ) + '">bar</a>&lt;/script&gt;',
+               '&lt;script&gt;<a title="Foo" href="' + mw.html.escape( mw.util.getUrl( 'Foo' ) ) + '">bar</a>&lt;/script&gt;',
                'Script tag text is escaped because that element is not allowed, but link inside is still HTML'
        );