Merge "Fixed use of wrong callback array element"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 25 Oct 2013 11:18:12 +0000 (11:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 25 Oct 2013 11:18:12 +0000 (11:18 +0000)
266 files changed:
RELEASE-NOTES-1.22
RELEASE-NOTES-1.23 [new file with mode: 0644]
cache/.htaccess [changed mode: 0644->0755]
docs/hooks.txt
includes/DefaultSettings.php
includes/EditPage.php
includes/ImagePage.php
includes/Linker.php
includes/Message.php
includes/OutputPage.php
includes/Status.php
includes/Title.php
includes/filebackend/FileBackendStore.php
includes/parser/Parser.php
includes/parser/ParserOutput.php
includes/specials/SpecialContributions.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialWatchlist.php
languages/messages/MessagesAf.php
languages/messages/MessagesAln.php
languages/messages/MessagesAn.php
languages/messages/MessagesAr.php
languages/messages/MessagesArz.php
languages/messages/MessagesAs.php
languages/messages/MessagesAst.php
languages/messages/MessagesBa.php
languages/messages/MessagesBcc.php
languages/messages/MessagesBcl.php
languages/messages/MessagesBe_tarask.php
languages/messages/MessagesBg.php
languages/messages/MessagesBn.php
languages/messages/MessagesBr.php
languages/messages/MessagesBs.php
languages/messages/MessagesCa.php
languages/messages/MessagesCe.php
languages/messages/MessagesCs.php
languages/messages/MessagesCy.php
languages/messages/MessagesDa.php
languages/messages/MessagesDe.php
languages/messages/MessagesDiq.php
languages/messages/MessagesDsb.php
languages/messages/MessagesEl.php
languages/messages/MessagesEn.php
languages/messages/MessagesEo.php
languages/messages/MessagesEs.php
languages/messages/MessagesEt.php
languages/messages/MessagesEu.php
languages/messages/MessagesFa.php
languages/messages/MessagesFi.php
languages/messages/MessagesFr.php
languages/messages/MessagesFrp.php
languages/messages/MessagesGl.php
languages/messages/MessagesGsw.php
languages/messages/MessagesGu.php
languages/messages/MessagesHe.php
languages/messages/MessagesHi.php
languages/messages/MessagesHr.php
languages/messages/MessagesHsb.php
languages/messages/MessagesHu.php
languages/messages/MessagesIa.php
languages/messages/MessagesId.php
languages/messages/MessagesIlo.php
languages/messages/MessagesIs.php
languages/messages/MessagesIt.php
languages/messages/MessagesJa.php
languages/messages/MessagesJv.php
languages/messages/MessagesKa.php
languages/messages/MessagesKo.php
languages/messages/MessagesKsh.php
languages/messages/MessagesLb.php
languages/messages/MessagesLi.php
languages/messages/MessagesLt.php
languages/messages/MessagesLv.php
languages/messages/MessagesMg.php
languages/messages/MessagesMin.php
languages/messages/MessagesMk.php
languages/messages/MessagesMl.php
languages/messages/MessagesMr.php
languages/messages/MessagesMs.php
languages/messages/MessagesNb.php
languages/messages/MessagesNds.php
languages/messages/MessagesNl.php
languages/messages/MessagesNn.php
languages/messages/MessagesOc.php
languages/messages/MessagesOr.php
languages/messages/MessagesPa.php
languages/messages/MessagesPl.php
languages/messages/MessagesPms.php
languages/messages/MessagesPnb.php
languages/messages/MessagesPt.php
languages/messages/MessagesPt_br.php
languages/messages/MessagesQqq.php
languages/messages/MessagesQu.php
languages/messages/MessagesRo.php
languages/messages/MessagesRoa_tara.php
languages/messages/MessagesRu.php
languages/messages/MessagesRue.php
languages/messages/MessagesSa.php
languages/messages/MessagesSah.php
languages/messages/MessagesSi.php
languages/messages/MessagesSk.php
languages/messages/MessagesSl.php
languages/messages/MessagesSq.php
languages/messages/MessagesSr_ec.php
languages/messages/MessagesSr_el.php
languages/messages/MessagesStq.php
languages/messages/MessagesSv.php
languages/messages/MessagesTk.php
languages/messages/MessagesTl.php
languages/messages/MessagesTr.php
languages/messages/MessagesUdm.php
languages/messages/MessagesUk.php
languages/messages/MessagesVec.php
languages/messages/MessagesVi.php
languages/messages/MessagesYue.php
languages/messages/MessagesZh_hans.php
languages/messages/MessagesZh_hant.php
maintenance/language/messages.inc
resources/Resources.php
resources/mediawiki/mediawiki.inspect.js
tests/TestsAutoLoader.php
tests/parser/parserTest.inc
tests/parser/parserTests.txt
tests/phpunit/includes/ArticleTablesTest.php
tests/phpunit/includes/ArticleTest.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/CdbTest.php
tests/phpunit/includes/CollationTest.php
tests/phpunit/includes/DiffHistoryBlobTest.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/ExternalStoreTest.php
tests/phpunit/includes/ExtraParserTest.php
tests/phpunit/includes/FallbackTest.php [new file with mode: 0644]
tests/phpunit/includes/FauxRequestTest.php
tests/phpunit/includes/FauxResponseTest.php
tests/phpunit/includes/FormOptionsInitializationTest.php
tests/phpunit/includes/FormOptionsTest.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php
tests/phpunit/includes/GlobalFunctions/wfAssembleUrlTest.php
tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php
tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php
tests/phpunit/includes/GlobalFunctions/wfBaseNameTest.php
tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php
tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php
tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php
tests/phpunit/includes/GlobalFunctions/wfRemoveDotSegmentsTest.php
tests/phpunit/includes/GlobalFunctions/wfShorthandToIntegerTest.php
tests/phpunit/includes/GlobalFunctions/wfTimestampTest.php
tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php
tests/phpunit/includes/HTMLCheckMatrixTest.php
tests/phpunit/includes/HashRingTest.php
tests/phpunit/includes/HooksTest.php
tests/phpunit/includes/HtmlFormatterTest.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/HttpTest.php
tests/phpunit/includes/IPTest.php
tests/phpunit/includes/LanguageConverterTest.php
tests/phpunit/includes/LicensesTest.php
tests/phpunit/includes/LinkerTest.php
tests/phpunit/includes/LinksUpdateTest.php
tests/phpunit/includes/LocalFileTest.php
tests/phpunit/includes/LocalisationCacheTest.php
tests/phpunit/includes/MWFunctionTest.php
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/PathRouterTest.php
tests/phpunit/includes/SampleTest.php
tests/phpunit/includes/StatusTest.php [new file with mode: 0644]
tests/phpunit/includes/StringUtilsTest.php
tests/phpunit/includes/TemplateCategoriesTest.php
tests/phpunit/includes/TitlePermissionTest.php
tests/phpunit/includes/UserMailerTest.php [new file with mode: 0644]
tests/phpunit/includes/WebRequestTest.php
tests/phpunit/includes/WikiPageTest.php
tests/phpunit/includes/XmlTest.php
tests/phpunit/includes/ZipDirectoryReaderTest.php
tests/phpunit/includes/api/ApiAccountCreationTest.php [deleted file]
tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/api/ApiCreateAccountTest.php [new file with mode: 0644]
tests/phpunit/includes/api/ApiEditPageTest.php
tests/phpunit/includes/api/ApiOptionsTest.php
tests/phpunit/includes/api/ApiParseTest.php
tests/phpunit/includes/api/ApiPurgeTest.php
tests/phpunit/includes/api/ApiTest.php
tests/phpunit/includes/api/ApiTestCase.php
tests/phpunit/includes/api/ApiTestContext.php [new file with mode: 0644]
tests/phpunit/includes/api/ApiUnblockTest.php [new file with mode: 0644]
tests/phpunit/includes/api/ApiUploadTest.php
tests/phpunit/includes/api/ApiWatchTest.php
tests/phpunit/includes/api/MockApi.php [new file with mode: 0644]
tests/phpunit/includes/api/PrefixUniquenessTest.php
tests/phpunit/includes/api/UserWrapper.php [new file with mode: 0644]
tests/phpunit/includes/api/format/ApiFormatJsonTest.php [new file with mode: 0644]
tests/phpunit/includes/api/format/ApiFormatPhpTest.php
tests/phpunit/includes/api/format/ApiFormatTestBase.php
tests/phpunit/includes/api/format/ApiFormatWddxTest.php [new file with mode: 0644]
tests/phpunit/includes/api/query/ApiQueryBasicTest.php
tests/phpunit/includes/api/query/ApiQueryContinue2Test.php
tests/phpunit/includes/api/query/ApiQueryContinueTest.php
tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
tests/phpunit/includes/api/query/ApiQueryTest.php
tests/phpunit/includes/api/query/ApiQueryTestBase.php
tests/phpunit/includes/cache/GenderCacheTest.php
tests/phpunit/includes/cache/MessageCacheTest.php
tests/phpunit/includes/cache/ProcessCacheLRUTest.php
tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
tests/phpunit/includes/db/DatabaseSQLTest.php
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/db/DatabaseTest.php
tests/phpunit/includes/db/ORMTableTest.php
tests/phpunit/includes/db/TestORMRowTest.php
tests/phpunit/includes/debug/MWDebugTest.php
tests/phpunit/includes/filerepo/FileRepoTest.php
tests/phpunit/includes/installer/InstallDocFormatterTest.php
tests/phpunit/includes/installer/OracleInstallerTest.php
tests/phpunit/includes/jobqueue/JobQueueTest.php
tests/phpunit/includes/json/FormatJsonTest.php
tests/phpunit/includes/libs/CSSMinTest.php
tests/phpunit/includes/libs/GenericArrayObjectTest.php
tests/phpunit/includes/libs/IEUrlExtensionTest.php
tests/phpunit/includes/libs/JavaScriptMinifierTest.php
tests/phpunit/includes/logging/LogFormatterTest.php
tests/phpunit/includes/media/BitmapMetadataHandlerTest.php
tests/phpunit/includes/media/BitmapScalingTest.php
tests/phpunit/includes/media/ExifBitmapTest.php
tests/phpunit/includes/media/ExifRotationTest.php
tests/phpunit/includes/media/ExifTest.php
tests/phpunit/includes/media/FakeDimensionFile.php [new file with mode: 0644]
tests/phpunit/includes/media/FormatMetadataTest.php
tests/phpunit/includes/media/GIFMetadataExtractorTest.php
tests/phpunit/includes/media/GIFTest.php
tests/phpunit/includes/media/IPTCTest.php
tests/phpunit/includes/media/JpegMetadataExtractorTest.php
tests/phpunit/includes/media/JpegTest.php
tests/phpunit/includes/media/MediaHandlerTest.php
tests/phpunit/includes/media/PNGMetadataExtractorTest.php
tests/phpunit/includes/media/PNGTest.php
tests/phpunit/includes/media/SVGMetadataExtractorTest.php
tests/phpunit/includes/media/TiffTest.php
tests/phpunit/includes/media/XMPTest.php
tests/phpunit/includes/media/XMPValidateTest.php
tests/phpunit/includes/normal/CleanUpTest.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/includes/parser/PreprocessorTest.php
tests/phpunit/includes/parser/TagHooksTest.php
tests/phpunit/includes/search/SearchEngineTest.php
tests/phpunit/includes/search/SearchUpdateTest.php
tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php
tests/phpunit/includes/specials/SpecialPreferencesTest.php
tests/phpunit/includes/specials/SpecialRecentchangesTest.php
tests/phpunit/includes/specials/SpecialSearchTest.php
tests/phpunit/includes/upload/UploadFromUrlTest.php
tests/phpunit/includes/upload/UploadStashTest.php
tests/phpunit/languages/LanguageTrTest.php
tests/phpunit/languages/utils/CLDRPluralRuleEvaluatorTest.php
tests/phpunit/maintenance/MaintenanceTest.php
tests/phpunit/maintenance/backupPrefetchTest.php
tests/phpunit/maintenance/backupTextPassTest.php
tests/phpunit/maintenance/backup_LogTest.php
tests/phpunit/maintenance/backup_PageTest.php
tests/phpunit/maintenance/fetchTextTest.php
tests/phpunit/maintenance/getSlaveServerTest.php
tests/phpunit/skins/SideBarTest.php

index 4cfd661..00026bc 100644 (file)
@@ -64,6 +64,7 @@ production.
 * (bug 54597) $wgBlockOpenProxies, $wgProxyPorts, $wgProxyScriptPath, and
   $wgProxyMemcExpiry have been removed, along with the open proxy scanner
   script they were added for.
+* Default value of $wgMaxShellMemory has been tripled (it's now 300 MB).
 
 === New features in 1.22 ===
 * (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements and attributes.
@@ -253,6 +254,12 @@ production.
   output in a HTML comment.
 * The 'UnwatchArticle' and 'WatchArticle' hooks now support a Status object
   instead of just a boolean return value to abort the hook.
+* Added a hook, SpecialWatchlistGetNonRevisionTypes, to allow extensions
+  with custom recentchanges entries to hook into the Watchlist without 
+  clobbering each other.
+* A hidden, empty input field was added to the edit form, and any edit that fills
+  it in will be rejected. This prevents against the simplest form of spambots.
+  Previously in the "SimpleAntiSpam" extension by Ryan Schmidt.
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
new file mode 100644 (file)
index 0000000..372170a
--- /dev/null
@@ -0,0 +1,89 @@
+Security reminder: MediaWiki does not require PHP's register_globals. If you
+have it on, turn it '''off''' if you can.
+
+== MediaWiki 1.23 ==
+
+THIS IS NOT A RELEASE YET
+
+MediaWiki 1.23 is an alpha-quality branch and is not recommended for use in
+production.
+
+=== Configuration changes in 1.23 ===
+
+=== New features in 1.23 ===
+
+=== Bug fixes in 1.23 ===
+
+=== API changes in 1.23 ===
+
+=== Languages updated in 1.23===
+
+MediaWiki supports over 350 languages. Many localisations are updated
+regularly. Below only new and removed languages are listed, as well as
+changes to languages because of Bugzilla reports.
+
+=== Other changes in 1.23 ===
+
+== Compatibility ==
+
+MediaWiki 1.23 requires PHP 5.3.2 or later.
+
+MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
+support for them is somewhat less mature. There is experimental support for
+Oracle.
+
+The supported versions are:
+
+* MySQL 5.0.2 or later
+* PostgreSQL 8.3 or later
+* SQLite 3.3.7 or later
+* Oracle 9.0.1 or later
+
+== Upgrading ==
+
+1.23 has several database changes since 1.22, and will not work without schema
+updates. Note that due to changes to some very large tables like the revision
+table, the schema update may take quite long (minutes on a medium sized site,
+many hours on a large site).
+
+If upgrading from before 1.11, and you are using a wiki as a commons
+repository, make sure that it is updated as well. Otherwise, errors may arise
+due to database schema changes.
+
+If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
+new database fields are filled with data.
+
+If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
+1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
+with MediaWiki 1.21.
+
+Don't forget to always back up your database before upgrading!
+
+See the file UPGRADE for more detailed upgrade instructions.
+
+For notes on 1.21.x and older releases, see HISTORY.
+
+== Online documentation ==
+
+Documentation for both end-users and site administrators is available on
+MediaWiki.org, and is covered under the GNU Free Documentation License (except
+for pages that explicitly state that their contents are in the public domain):
+
+       https://www.mediawiki.org/wiki/Documentation
+
+== Mailing list ==
+
+A mailing list is available for MediaWiki user support and discussion:
+
+       https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
+
+A low-traffic announcements-only list is also available:
+
+       https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
+
+It's highly recommended that you sign up for one of these lists if you're
+going to run a public MediaWiki, so you can be notified of security fixes.
+
+== IRC help ==
+
+There's usually someone online in #mediawiki on irc.freenode.net.
old mode 100644 (file)
new mode 100755 (executable)
index 26032cb..5aaf596 100644 (file)
@@ -2365,6 +2365,11 @@ $special: the special page object
 &$fields: array of query fields
 $values: array of variables with watchlist options
 
+'SpecialWatchlistGetNonRevisionTypes': Called when building sql query for
+SpecialWatchlist. Allows extensions to register custom values they have 
+inserted to rc_type so they can be returned as part of the watchlist.
+&$nonRevisionTypes: array of values in the rc_type field of recentchanges table
+
 'TestCanonicalRedirect': Called when about to force a redirect to a canonical
 URL for a title when we have no other parameters on the URL. Gives a chance for
 extensions that alter page view behavior radically to abort that redirect or
index cc694a3..dbdd89e 100644 (file)
@@ -63,7 +63,7 @@ $wgConf = new SiteConfiguration;
  * MediaWiki version number
  * @since 1.2
  */
-$wgVersion = '1.22alpha';
+$wgVersion = '1.23alpha';
 
 /**
  * Name of the site. It must be changed in LocalSettings.php
@@ -4365,6 +4365,20 @@ $wgRestrictionLevels = array( '', 'autoconfirmed', 'sysop' );
  */
 $wgCascadingRestrictionLevels = array( 'sysop' );
 
+/**
+ * Restriction levels that should be considered "semiprotected"
+ *
+ * Certain places in the interface recognize a dichotomy between "protected"
+ * and "semiprotected", without further distinguishing the specific levels. In
+ * general, if anyone can be eligible to edit a protection level merely by
+ * reaching some condition in $wgAutopromote, it should probably be considered
+ * "semiprotected".
+ *
+ * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
+ * 'sysop' is not changed, since it really shouldn't be here.
+ */
+$wgSemiprotectedRestrictionLevels = array( 'autoconfirmed' );
+
 /**
  * Set the minimum permissions required to edit pages in each
  * namespace.  If you list more than one permission, a user must
@@ -6615,7 +6629,7 @@ $wgCrossSiteAJAXdomainExceptions = array();
 /**
  * Maximum amount of virtual memory available to shell processes under linux, in KB.
  */
-$wgMaxShellMemory = 102400;
+$wgMaxShellMemory = 307200;
 
 /**
  * Maximum file size created by shell processes under linux, in KB
index d7b2b5e..530e267 100644 (file)
@@ -1381,6 +1381,24 @@ class EditPage {
                        return $status;
                }
 
+               $spam = $wgRequest->getText( 'wpAntispam' );
+               if ( $spam !== '' ) {
+                       wfDebugLog(
+                               'SimpleAntiSpam',
+                               $wgUser->getName() .
+                               ' editing "' .
+                               $this->mTitle->getPrefixedText() .
+                               '" submitted bogus field "' .
+                               $spam .
+                               '"'
+                       );
+                       $status->fatal( 'spamprotectionmatch', false );
+                       $status->value = self::AS_SPAM_ERROR;
+                       wfProfileOut( __METHOD__ . '-checks' );
+                       wfProfileOut( __METHOD__ );
+                       return $status;
+               }
+
                try {
                        # Construct Content object
                        $textbox_content = $this->toEditContent( $this->textbox1 );
@@ -2190,6 +2208,14 @@ class EditPage {
                        call_user_func_array( $formCallback, array( &$wgOut ) );
                }
 
+               // Add an empty field to trip up spambots
+               $wgOut->addHTML(
+                       Xml::openElement( 'div', array( 'id' => 'antispam-container', 'style' => 'display: none;' ) )
+                       . Html::rawElement( 'label', array( 'for' => 'wpAntiSpam' ), wfMessage( 'simpleantispam-label' )->parse() )
+                       . Xml::element( 'input', array( 'type' => 'text', 'name' => 'wpAntispam', 'id' => 'wpAntispam', 'value' => '' ) )
+                       . Xml::closeElement( 'div' )
+               );
+
                wfRunHooks( 'EditPage::showEditForm:fields', array( &$this, &$wgOut ) );
 
                // Put these up at the top to ensure they aren't lost on early form submission
index 7ea06b0..515f146 100644 (file)
@@ -600,7 +600,7 @@ EOT
                $this->loadFile();
 
                $descUrl = $this->mPage->getFile()->getDescriptionUrl();
-               $descText = $this->mPage->getFile()->getDescriptionText();
+               $descText = $this->mPage->getFile()->getDescriptionText( $this->getContext()->getLanguage() );
 
                /* Add canonical to head if there is no local page for this shared file */
                if ( $descUrl && $this->mPage->getID() == 0 ) {
index 23ece75..4dcdfd5 100644 (file)
@@ -2116,9 +2116,10 @@ class Linker {
                        $accesskey = self::accesskey( $name );
                        if ( $accesskey !== false ) {
                                if ( $tooltip === false || $tooltip === '' ) {
-                                       $tooltip = "[$accesskey]";
+                                       $tooltip = wfMessage( 'brackets', $accesskey )->escaped();
                                } else {
-                                       $tooltip .= " [$accesskey]";
+                                       $tooltip .= wfMessage( 'word-separator' )->escaped();
+                                       $tooltip .= wfMessage( 'brackets', $accesskey )->escaped();
                                }
                        }
                }
index 208f96e..57c6264 100644 (file)
@@ -799,7 +799,7 @@ class Message {
         * @return Tuple(type, value)
         */
        protected function extractParam( $param ) {
-               if ( is_array( $param ) ){
+               if ( is_array( $param ) ) {
                        if ( isset( $param['raw'] ) ) {
                                return array( 'after', $param['raw'] );
                        } elseif ( isset( $param['num'] ) ) {
@@ -823,6 +823,11 @@ class Message {
                                );
                                return array( 'before', '[INVALID]' );
                        }
+               } elseif ( $param instanceof Message ) {
+                       // Message objects should not be before parameters because
+                       // then they'll get double escaped. If the message needs to be
+                       // escaped, it'll happen right here when we call toString().
+                       return array( 'after', $param->toString() );
                } else {
                        return array( 'before', $param );
                }
index 6a1ce19..7f0454f 100644 (file)
@@ -255,6 +255,11 @@ class OutputPage extends ContextSource {
         */
        private $mTarget = null;
 
+       /**
+        * @var bool: Whether output should contain table of contents
+        */
+       private $mEnableTOC = true;
+
        /**
         * Constructor for OutputPage. This should not be called directly.
         * Instead a new RequestContext should be created and it will implicitly create
@@ -1606,6 +1611,7 @@ class OutputPage extends ContextSource {
         */
        function addParserOutput( &$parserOutput ) {
                $this->addParserOutputNoText( $parserOutput );
+               $parserOutput->setTOCEnabled( $this->mEnableTOC );
                $text = $parserOutput->getText();
                wfRunHooks( 'OutputPageBeforeHTML', array( &$this, &$text ) );
                $this->addHTML( $text );
@@ -3648,4 +3654,20 @@ $templates
                return array();
        }
 
+       /**
+        * Enables/disables TOC, doesn't override __NOTOC__
+        * @param bool $flag
+        * @since 1.22
+        */
+       public function enableTOC( $flag = true ) {
+               $this->mEnableTOC = $flag;
+       }
+
+       /**
+        * @return bool
+        * @since 1.22
+        */
+       public function isTOCEnabled() {
+               return $this->mEnableTOC;
+       }
 }
index 7a84fed..928f8eb 100644 (file)
@@ -188,15 +188,18 @@ class Status {
                        }
                }
                if ( count( $this->errors ) == 1 ) {
-                       $s = $this->getErrorMessage( $this->errors[0] );
+                       $s = $this->getErrorMessage( $this->errors[0] )->plain();
                        if ( $shortContext ) {
                                $s = wfMessage( $shortContext, $s )->plain();
                        } elseif ( $longContext ) {
                                $s = wfMessage( $longContext, "* $s\n" )->plain();
                        }
                } else {
-                       $s = '* ' . implode( "\n* ",
-                               $this->getErrorMessageArray( $this->errors ) ) . "\n";
+                       $errors = $this->getErrorMessageArray( $this->errors );
+                       foreach ( $errors as &$error ) {
+                               $error = $error->plain();
+                       }
+                       $s = '* ' . implode( "\n* ", $errors ) . "\n";
                        if ( $longContext ) {
                                $s = wfMessage( $longContext, $s )->plain();
                        } elseif ( $shortContext ) {
@@ -206,6 +209,56 @@ class Status {
                return $s;
        }
 
+       /**
+        * Get the error list as a Message object
+        *
+        * @param string $shortContext a short enclosing context message name, to
+        *        be used when there is a single error
+        * @param string $longContext a long enclosing context message name, for a list
+        * @return Message
+        */
+       function getMessage( $shortContext = false, $longContext = false ) {
+               if ( count( $this->errors ) == 0 ) {
+                       if ( $this->ok ) {
+                               $this->fatal( 'internalerror_info',
+                                       __METHOD__ . " called for a good result, this is incorrect\n" );
+                       } else {
+                               $this->fatal( 'internalerror_info',
+                                       __METHOD__ . ": Invalid result object: no error text but not OK\n" );
+                       }
+               }
+               if ( count( $this->errors ) == 1 ) {
+                       $s = $this->getErrorMessage( $this->errors[0] );
+                       if ( $shortContext ) {
+                               $s = wfMessage( $shortContext, $s );
+                       } elseif ( $longContext ) {
+                               $wrapper = new RawMessage( "* \$1\n" );
+                               $wrapper->params( $s )->parse();
+                               $s = wfMessage( $longContext, $wrapper );
+                       }
+               } else {
+                       $msgs =  $this->getErrorMessageArray( $this->errors );
+                       $msgCount = count( $msgs );
+
+                       if ( $shortContext ) {
+                               $msgCount++;
+                       }
+
+                       $wrapper = new RawMessage( '* $' . implode( "\n* \$", range( 1, $msgCount ) ) );
+                       $s = $wrapper->params( $msgs )->parse();
+
+                       if ( $longContext ) {
+                               $s = wfMessage( $longContext, $wrapper );
+                       } elseif ( $shortContext ) {
+                               $wrapper = new RawMessage( "\n\$1\n", $wrapper );
+                               $wrapper->parse();
+                               $s = wfMessage( $shortContext, $wrapper );
+                       }
+               }
+
+               return $s;
+       }
+
        /**
         * Return the message for a single error.
         * @param $error Mixed With an array & two values keyed by
@@ -230,7 +283,7 @@ class Status {
                } else {
                        $msg = wfMessage( $error );
                }
-               return $msg->plain();
+               return $msg;
        }
 
        /**
@@ -371,15 +424,6 @@ class Status {
                return $replaced;
        }
 
-       /**
-        * Backward compatibility function for WikiError -> Status migration
-        *
-        * @return String
-        */
-       public function getMessage() {
-               return $this->getWikiText();
-       }
-
        /**
         * @return mixed
         */
index 0d11821..21872e4 100644 (file)
@@ -2458,31 +2458,31 @@ class Title {
        }
 
        /**
-        * Is this page "semi-protected" - the *only* protection is autoconfirm?
+        * Is this page "semi-protected" - the *only* protection levels are listed
+        * in $wgSemiprotectedRestrictionLevels?
         *
         * @param string $action Action to check (default: edit)
         * @return Bool
         */
        public function isSemiProtected( $action = 'edit' ) {
-               if ( $this->exists() ) {
-                       $restrictions = $this->getRestrictions( $action );
-                       if ( count( $restrictions ) > 0 ) {
-                               foreach ( $restrictions as $restriction ) {
-                                       if ( strtolower( $restriction ) != 'editsemiprotected' &&
-                                               strtolower( $restriction ) != 'autoconfirmed' // BC
-                                       ) {
-                                               return false;
-                                       }
-                               }
-                       } else {
-                               # Not protected
-                               return false;
-                       }
-                       return true;
-               } else {
-                       # If it doesn't exist, it can't be protected
+               global $wgSemiprotectedRestrictionLevels;
+
+               $restrictions = $this->getRestrictions( $action );
+               $semi = $wgSemiprotectedRestrictionLevels;
+               if ( !$restrictions || !$semi ) {
+                       // Not protected, or all protection is full protection
                        return false;
                }
+
+               // Remap autoconfirmed to editsemiprotected for BC
+               foreach ( array_keys( $semi, 'autoconfirmed' ) as $key ) {
+                       $semi[$key] = 'editsemiprotected';
+               }
+               foreach ( array_keys( $restrictions, 'autoconfirmed' ) as $key ) {
+                       $restrictions[$key] = 'editsemiprotected';
+               }
+
+               return !array_diff( $restrictions, $semi );
        }
 
        /**
index 0921e99..29089c9 100644 (file)
@@ -1035,7 +1035,7 @@ abstract class FileBackendStore extends FileBackend {
                // Clear any file cache entries
                $this->clearCache();
 
-               $supportedOps = array( 'create', 'store', 'copy', 'move', 'delete', 'null' );
+               $supportedOps = array( 'create', 'store', 'copy', 'move', 'delete', 'describe', 'null' );
                $async = ( $this->parallelize === 'implicit' && count( $ops ) > 1 );
                $maxConcurrency = $this->concurrency; // throttle
 
index 5e86209..1f14223 100644 (file)
@@ -115,6 +115,10 @@ class Parser {
        # Marker Suffix needs to be accessible staticly.
        const MARKER_SUFFIX = "-QINU\x7f";
 
+       # Markers used for wrapping the table of contents
+       const TOC_START = '<mw:toc>';
+       const TOC_END = '</mw:toc>';
+
        # Persistent:
        var $mTagHooks = array();
        var $mTransparentTagHooks = array();
@@ -2462,7 +2466,7 @@ class Parser {
                                $openmatch = preg_match( '/(?:<table|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
                                $closematch = preg_match(
                                        '/(?:<\\/table|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|' .
-                                       '<td|<th|<\\/?blockquote|<\\/?div|<hr|<\\/pre|<\\/p|' . $this->mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t );
+                                       '<td|<th|<\\/?blockquote|<\\/?div|<hr|<\\/pre|<\\/p|<\\/mw:|' . $this->mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t );
                                if ( $openmatch or $closematch ) {
                                        $paragraphStack = false;
                                        # TODO bug 5718: paragraph closed
@@ -4516,6 +4520,7 @@ class Parser {
                        }
                        $toc = Linker::tocList( $toc, $this->mOptions->getUserLangObj() );
                        $this->mOutput->setTOCHTML( $toc );
+                       $toc = self::TOC_START . $toc . self::TOC_END;
                }
 
                if ( $isMain ) {
index 9519de9..502f0fd 100644 (file)
@@ -47,7 +47,8 @@ class ParserOutput extends CacheTime {
                $mEditSectionTokens = false,  # prefix/suffix markers if edit sections were output as tokens
                $mProperties = array(),       # Name/value pairs to be cached in the DB
                $mTOCHTML = '',               # HTML of the TOC
-               $mTimestamp;                  # Timestamp of the revision
+               $mTimestamp,                  # Timestamp of the revision
+               $mTOCEnabled = true;          # Whether TOC should be shown, can't override __NOTOC__
                private $mIndexPolicy = '';       # 'index' or 'noindex'?  Any other value will result in no change.
                private $mAccessedOptions = array(); # List of ParserOptions (stored in the keys)
                private $mSecondaryDataUpdates = array(); # List of DataUpdate, used to save info from the page somewhere else.
@@ -68,11 +69,27 @@ class ParserOutput extends CacheTime {
        }
 
        function getText() {
+               wfProfileIn( __METHOD__ );
+               $text = $this->mText;
                if ( $this->mEditSectionTokens ) {
-                       return preg_replace_callback( ParserOutput::EDITSECTION_REGEX,
-                               array( &$this, 'replaceEditSectionLinksCallback' ), $this->mText );
+                       $text = preg_replace_callback( ParserOutput::EDITSECTION_REGEX,
+                               array( &$this, 'replaceEditSectionLinksCallback' ), $text );
+               } else {
+                       $text = preg_replace( ParserOutput::EDITSECTION_REGEX, '', $text );
+               }
+
+               // If you have an old cached version of this class - sorry, you can't disable the TOC
+               if ( isset( $this->mTOCEnabled ) && $this->mTOCEnabled ) {
+                       $text = str_replace( array( Parser::TOC_START, Parser::TOC_END ), '', $text );
+               } else {
+                       $text = preg_replace(
+                               '#'. preg_quote( Parser::TOC_START ) . '.*?' . preg_quote( Parser::TOC_END ) . '#s',
+                               '',
+                               $text
+                       );
                }
-               return preg_replace( ParserOutput::EDITSECTION_REGEX, '', $this->mText );
+               wfProfileOut( __METHOD__ );
+               return $text;
        }
 
        /**
@@ -123,6 +140,7 @@ class ParserOutput extends CacheTime {
        function getTOCHTML()                { return $this->mTOCHTML; }
        function getTimestamp()              { return $this->mTimestamp; }
        function getLimitReportData()        { return $this->mLimitReportData; }
+       function getTOCEnabled()             { return $this->mTOCEnabled; }
 
        function setText( $text )            { return wfSetVar( $this->mText, $text ); }
        function setLanguageLinks( $ll )     { return wfSetVar( $this->mLanguageLinks, $ll ); }
@@ -134,6 +152,7 @@ class ParserOutput extends CacheTime {
        function setIndexPolicy( $policy )   { return wfSetVar( $this->mIndexPolicy, $policy ); }
        function setTOCHTML( $tochtml )      { return wfSetVar( $this->mTOCHTML, $tochtml ); }
        function setTimestamp( $timestamp )  { return wfSetVar( $this->mTimestamp, $timestamp ); }
+       function setTOCEnabled( $flag )      { return wfSetVar( $this->mTOCEnabled, $flag ); }
 
        function addCategory( $c, $sort )    { $this->mCategories[$c] = $sort; }
        function addLanguageLink( $t )       { $this->mLanguageLinks[] = $t; }
index 0f910a5..1fe9819 100644 (file)
@@ -954,7 +954,7 @@ class ContribsPager extends ReverseChronologicalPager {
                        } else {
                                $parentLen = 0;
                                if ( isset( $this->mParentLens[$row->rev_parent_id] ) ) {
-                                       $this->mParentLens[$row->rev_parent_id];
+                                       $parentLen = $this->mParentLens[$row->rev_parent_id];
                                }
 
                                $chardiff = ' <span class="mw-changeslist-separator">. .</span> ';
index 90c4c35..5ac3e65 100644 (file)
@@ -221,8 +221,8 @@ class LoginForm extends SpecialPage {
 
                $status = $this->addNewaccountInternal();
                if ( !$status->isGood() ) {
-                       $error = $this->getOutput()->parse( $status->getWikiText() );
-                       $this->mainLoginForm( $error );
+                       $error = $status->getMessage();
+                       $this->mainLoginForm( $error->toString() );
                        return;
                }
 
@@ -257,8 +257,8 @@ class LoginForm extends SpecialPage {
                # Create the account and abort if there's a problem doing so
                $status = $this->addNewAccountInternal();
                if ( !$status->isGood() ) {
-                       $error = $this->getOutput()->parse( $status->getWikiText() );
-                       $this->mainLoginForm( $error );
+                       $error = $status->getMessage();
+                       $this->mainLoginForm( $error->toString() );
                        return false;
                }
 
@@ -447,7 +447,9 @@ class LoginForm extends SpecialPage {
                if ( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError ) ) ) {
                        // Hook point to add extra creation throttles and blocks
                        wfDebug( "LoginForm::addNewAccountInternal: a hook blocked creation\n" );
-                       return Status::newFatal( new RawMessage( $abortError ) );
+                       $abortError = new RawMessage( $abortError );
+                       $abortError->text();
+                       return Status::newFatal( $abortError );
                }
 
                // Hook point to check for exempt from account creation throttle
index 11632a3..4afa279 100644 (file)
@@ -208,7 +208,21 @@ class SpecialWatchlist extends SpecialPage {
                        $usePage = false;
                } else {
                        # Top log Ids for a page are not stored
-                       $conds[] = 'rc_this_oldid=page_latest OR rc_type=' . RC_LOG;
+                       $nonRevisionTypes = array( RC_LOG );
+                       wfRunHooks( 'SpecialWatchlistGetNonRevisionTypes', array( &$nonRevisionTypes ) );
+                       if ( $nonRevisionTypes ) {
+                               if ( count( $nonRevisionTypes ) === 1 ) {
+                                       // if only one use an equality instead of IN condition
+                                       $nonRevisionTypes = reset( $nonRevisionTypes );
+                               }
+                               $conds[] = $dbr->makeList(
+                                       array(
+                                               'rc_this_oldid=page_latest',
+                                               'rc_type' => $nonRevisionTypes,
+                                       ),
+                                       LIST_OR
+                               );
+                       }
                        $limitWatchlist = 0;
                        $usePage = true;
                }
index 1443309..271ba5c 100644 (file)
@@ -3070,6 +3070,8 @@ Hierdie situasie was waarskynlik deur 'n skakel na 'n eksterne webtuiste op ons
 'spam_reverting' => 'Besig met terugrol na die laaste weergawe wat nie skakels na $1 bevat nie',
 'spam_blanking' => "Alle weergawes met 'n skakel na $1 word verwyder",
 'spam_deleting' => 'Alle weergawes bevat verwysings na $1. Bladsy verwyder',
+'simpleantispam-label' => "Anti-spam kontrole.
+'''Moenie''' die veld invul nie!",
 
 # Info page
 'pageinfo-title' => 'Inligting oor "$1"',
index c5c19e2..332eda3 100644 (file)
@@ -1504,6 +1504,9 @@ Lejon dhânien e arsyes në përmbledhje.',
 'siteusers' => '{{SITENAME}} {{PLURAL:$2|përdorues|përdorues}} $1',
 'creditspage' => 'Kreditat e faqes',
 
+# Spam protection
+'simpleantispam-label' => "Anti-spam kontrolloni. A'''''NUK' plotësoni këtë!",
+
 # Browsing diffs
 'previousdiff' => '← Redaktim mâ i vjetër',
 'nextdiff' => 'Redaktim ma i ri →',
index c180c9f..71ddec7 100644 (file)
@@ -2718,6 +2718,8 @@ Puede veyer-ne, manimenos, o codigo fuent.',
 'spambot_username' => 'Esporga de spam de MediaWiki',
 'spam_reverting' => "Tornando t'a zaguera versión sin de vinclos ta $1",
 'spam_blanking' => 'Todas as versions teneban vinclos ta $1, se deixa en blanco',
+'simpleantispam-label' => "Preba anti-spam.
+'''NO''' replene esto!",
 
 # Info page
 'pageinfo-title' => 'Información ta «$1»',
index 1e82ec5..4505ae6 100644 (file)
@@ -3407,6 +3407,8 @@ $2',
 'spam_reverting' => 'استرجاع آخر نسخة ليس بها وصلات إلى $1',
 'spam_blanking' => 'كل النسخ احتوت على وصلات ل $1، إفراغ',
 'spam_deleting' => 'جميع النسخ تحوي رابطا إلى $1، يتم الحذف',
+'simpleantispam-label' => "اختبار ضد السبام.
+'''لا''' تملأ هذا!",
 
 # Info page
 'pageinfo-title' => 'المعلومات عن «$1»',
index 13b3f37..a7d03e9 100644 (file)
@@ -2736,6 +2736,8 @@ $1',
 'spambot_username' => 'تنظيف سبام ميدياويكى',
 'spam_reverting' => 'ترجيع آخر نسخة مافيهاش لينكات لـ $1',
 'spam_blanking' => 'كل النسخ فيها لينكات ل $1، فضيها',
+'simpleantispam-label' => "اختبار انتي-سبام.
+'''ماتعبيش''' دا!",
 
 # Skin names
 'skinname-cologneblue' => 'كولون بلو',
index ada0998..b56ee1a 100644 (file)
@@ -3025,6 +3025,8 @@ $2',
 'spam_reverting' => '$1লৈ সংযোগ নথকা সৰ্বশেষ পুনৰীক্ষনলে উভতাই নিয়া হৈছে',
 'spam_blanking' => 'সকলো পুনৰীক্ষনৰ $1লৈ সংযোগ আছিল, ৰিক্ত কৰা হৈছে',
 'spam_deleting' => 'সকলো পুনৰীক্ষণৰ $1লৈ সংযোগ আছিল, বিলোপ কৰা হৈছে',
+'simpleantispam-label' => "এণ্টি-স্পাম পৰীক্ষা।
+এইখন পূৰণ '''নকৰিব'''!",
 
 # Info page
 'pageinfo-title' => '"$1" ৰ তথ্য',
index 8923642..442d64e 100644 (file)
@@ -2981,6 +2981,8 @@ Probablemente tea causao por un enllaz a un sitiu esternu de la llista prieta.',
 'spam_reverting' => 'Revirtiendo a la cabera versión que nun contién enllaces a $1',
 'spam_blanking' => 'Toles revisiones teníen enllaces a $1; dexando en blanco',
 'spam_deleting' => 'Toles revisiones teníen enllaces a $1, desaniciando',
+'simpleantispam-label' => "Control anti-spam.
+¡'''NUN''' rellenes esto!",
 
 # Info page
 'pageinfo-title' => 'Información sobro "$1"',
index 848a9b3..dd61d09 100644 (file)
@@ -3013,6 +3013,8 @@ The wiki server cannot provide data in a format your client can read.',
 'spam_reverting' => '$1 һылтанмаһыҙ һуңғы өлгөгә ҡайтарыу',
 'spam_blanking' => 'Бөтә өлгөләрҙә лә $1 һылтанмаһы бар, таҙартыу',
 'spam_deleting' => 'Бөтә өлгөләрҙә лә $1 һылтанма бар, таҙартыу бара',
+'simpleantispam-label' => "Спамға ҡаршы тикшереү.
+Быны '''ТУЛТЫРМАҒЫҘ'''!",
 
 # Info page
 'pageinfo-title' => '«$1» буйынса мәғлүмәт',
index 62d92e9..22094fb 100644 (file)
@@ -2370,6 +2370,8 @@ $1',
 'spambot_username' => 'اسپم پاک کنوک مدیا وی کی',
 'spam_reverting' => 'عوض کتن په آهری نسحه که شامل لینکان می بیت په $1',
 'spam_blanking' => 'کل بازبینی آن شامل لینکان په $1, بوتت  هالیکی',
+'simpleantispam-label' => "کنترل ضد اسپم.
+ای شیء پر ''مکن''",
 
 # Skin names
 'skinname-cologneblue' => 'نیلی کولاجن',
index fee4441..1575605 100644 (file)
@@ -2960,6 +2960,8 @@ Ini hurot na pinagkausa nin sarong sugpunan pasiring sa sarong pinagbawal na pan
 'spam_reverting' => 'Mabalik sa huring bersion na mayong takod sa $1',
 'spam_blanking' => 'An gabos na mga pahirá na may takod sa $1, pigblablanko',
 'spam_deleting' => 'An gabos na mga rebisyon na igwang mga kasugpunan sa $1, pinupura',
+'simpleantispam-label' => 'Narikisa kan anti-espam.
+"Dae" ka magkaag nin laman digde!',
 
 # Info page
 'pageinfo-title' => 'Impormasyon para sa "$1"',
index f3e431f..00fb4de 100644 (file)
@@ -3120,6 +3120,8 @@ $2',
 'spam_reverting' => 'Адкат да апошняй вэрсіі без спасылак на $1',
 'spam_blanking' => 'Усе вэрсіі ўтрымліваюць спасылкі на $1, чыстка',
 'spam_deleting' => 'Усе вэрсіі ўтрымлівалі спасылкі на $1, выдаляем',
+'simpleantispam-label' => "Праверка анты-спаму.
+'''НЕ''' запаўняйце тут нічога!",
 
 # Info page
 'pageinfo-title' => 'Інфармацыя пра «$1»',
index f3db6e5..868d600 100644 (file)
@@ -2926,6 +2926,8 @@ $1',
 'spam_reverting' => 'Връщане на последната версия, несъдържаща препратки към $1',
 'spam_blanking' => 'Всички версии, съдържащи препратки към $1, изчистване',
 'spam_deleting' => 'Всички версии съдържат препратки към $1, изтриване',
+'simpleantispam-label' => "Проверка за спам.
+Необходимо е да '''НЕ''' попълвате това поле!",
 
 # Info page
 'pageinfo-title' => 'Информация за "$1"',
index e9a6f9e..f62a548 100644 (file)
@@ -2901,6 +2901,8 @@ $2',
 'spam_reverting' => '$1-এর প্রতি কোন সংযোগ নেই, এমন সর্বশেষ সংস্করণে ফেরত নেওয়া হচ্ছে।',
 'spam_blanking' => '$1-এর প্রতি সংযোগ অন্তর্ভুক্ত আছে এমন সমস্ত সংশোধন খালি করা হচ্ছে',
 'spam_deleting' => '$1-এর প্রতি সংযোগ অন্তর্ভুক্ত আছে এমন সমস্ত সংশোধন অপসারণ করা হচ্ছে',
+'simpleantispam-label' => "এন্টি-স্প্যাম যাচাই।
+এটা পূরণ করবেন '''না'''!",
 
 # Info page
 'pageinfo-title' => '"$1" এর তথ্য',
index daab6d4..9191af5 100644 (file)
@@ -3027,6 +3027,8 @@ Sur a-walc'h abalamour d'ul liamm enni a gas d'ul lec'hienn ziavaez berzet.",
 'spam_reverting' => "Distreiñ d'ar stumm diwezhañ hep liamm davet $1",
 'spam_blanking' => 'Diverkañ an holl stummoù enno liammoù davet $1',
 'spam_deleting' => 'An holl stummoù enno liammoù war-zu $1, o tiverkañ',
+'simpleantispam-label' => "Taol gwiriañ eneb-strob.
+'''Arabat''' merkañ tra pe dra amañ !",
 
 # Info page
 'pageinfo-title' => 'Titouroù evit "$1"',
index 0db0d0c..ded7582 100644 (file)
@@ -3128,6 +3128,8 @@ Ovo je vjerovatno izazvao vezom ka vanjskoj nepoželjnoj stranici.',
 'spam_reverting' => 'Vraćanje na zadnju verziju koja ne sadrži linkove ka $1',
 'spam_blanking' => 'Sve revizije koje sadrže linkove ka $1, očisti',
 'spam_deleting' => 'Sve revizije koje sadrže linkove na $1, brišem',
+'simpleantispam-label' => "Provjera protiv spama.
+'''NE''' popunjavaj ovo!",
 
 # Info page
 'pageinfo-title' => 'Informacije za "$1"',
index 759a4c1..f95bbe6 100644 (file)
@@ -3036,6 +3036,8 @@ Això deu ser degut per un enllaç a un lloc extern inclòs a la llista negra.',
 'spam_reverting' => 'Es reverteix a la darrera versió que no conté enllaços a $1',
 'spam_blanking' => "Totes les revisions contenien enllaços $1, s'està deixant en blanc",
 'spam_deleting' => "S'estan suprimint totes les revisions que contenien enllaços a $1",
+'simpleantispam-label' => "Comprovació anti-spam.
+'''NO''' ho ompliu!",
 
 # Info page
 'pageinfo-title' => 'Informació de «$1»',
index 4e02782..a9b6f97 100644 (file)
@@ -362,6 +362,7 @@ $messages = array(
 'tog-noconvertlink' => 'Хааман хьажориг кхуллу гlирс дlабайа',
 'tog-norollbackdiff' => 'Юха яккхиначул тӀаьхьа ма гайта версешан башхо',
 'tog-useeditwarning' => 'Хаамбе бина хийцамаш дӀаязцабеш аса болх дӀатосучу хенахь',
+'tog-prefershttps' => 'Даима лела йе лардина системин чудалар',
 
 'underline-always' => 'Даимна',
 'underline-never' => 'Цкъа а',
@@ -1146,6 +1147,8 @@ $1',
 'recentchangesdays-max' => 'Къезиг  $1 {{PLURAL:$1|дена}}',
 'recentchangescount' => 'Iад йитарца гойтуш долу нисдаршан дукхалла',
 'prefs-help-recentchangescount' => 'Гойту керла нисдарш, агӀонашан истори, тептарш.',
+'prefs-help-watchlist-token2' => 'Иза хьан тергаме могӀан къайла догӀа ду.
+Муьлха и хуучунна йиш ю хьан тергаме могӀам беша, цундела ма хаийта иза кхечаьрга. [[Special:ResetTokens|ТӀетаӀа йе кхуза и хьайга кхосса лууш делахь]].',
 'savedprefs' => 'Хьан гӀирс Ӏалашбина.',
 'timezonelegend' => 'Сахьатан аса:',
 'localtime' => 'Меттигера хан:',
@@ -2461,7 +2464,7 @@ PICT # тайп тайпан
 'htmlform-selectorother-other' => 'Кхин',
 
 # New logging system
-'logentry-delete-delete' => '$1 {{GENDER:$2|дӀаякхина|дӀаякхина}} агӀо $3',
+'logentry-delete-delete' => '$1 {{GENDER:$2|дӀаяьккхина}} агӀо $3',
 'logentry-delete-restore' => '$1 {{GENDER:$2|меттахӀоттайина|меттахӀоттайина}} агӀо $3',
 'logentry-move-move' => '$1 {{GENDER:$2|цӀе хийцина|цӀе хийцина}} $3 оцу $4',
 'logentry-move-move-noredirect' => '$1 {{GENDER:$2|цӀе хийцина|цӀе хийцина}} $3 оцу $4 дӀасахьажийнарг цаюьтуш',
index c4277c2..06378b9 100644 (file)
@@ -3212,6 +3212,8 @@ Uložte jej na svůj disk a nahrajte ho sem.',
 'spam_reverting' => 'Revert na poslední verzi neobsahující odkazy na $1',
 'spam_blanking' => 'Všechny verze obsahovaly odkazy na $1, vyprázdněno',
 'spam_deleting' => 'Všechny verze obsahovaly odkazy na $1, smazáno',
+'simpleantispam-label' => "Antispamová kontrola.
+'''NEVYPLŇUJTE''' následující!",
 
 # Info page
 'pageinfo-title' => 'Informace o stránce „$1“',
index e7c3818..340c375 100644 (file)
@@ -2957,6 +2957,8 @@ Achos hyn yn fwy na thebyg yw presenoldeb cysylltiad i wefan ar y rhestr wahardd
 'spam_reverting' => 'Wedi adfer y diwygiad diweddaraf na sydd yn cynnwys cysylltiadau i $1',
 'spam_blanking' => 'Roedd cysylltiadau i $1 gan bob golygiad, felly gwacawyd y dudalen',
 'spam_deleting' => 'Roedd pob diwygiad yn cynnwys cysylltiadau â $1, felly fe ddilëwyd y dudalen',
+'simpleantispam-label' => "Prawf gwrth-sbam.
+'''Peidiwch''' â llenwi hwn!",
 
 # Info page
 'pageinfo-title' => 'Manylion "$1"',
index d090089..645f396 100644 (file)
@@ -35,6 +35,7 @@
  * @author Morten LJ
  * @author Najami
  * @author Nghtwlkr
+ * @author Overlaet
  * @author Palnatoke
  * @author Peter Alberti
  * @author Peter Andersen
@@ -3039,6 +3040,8 @@ Dette skyldes sandsynligvis en henvisning til et sortlistet eksternt websted.',
 'spam_reverting' => 'Sidste version uden henvisning til $1 gendannet.',
 'spam_blanking' => 'Alle versioner, som indeholdt henvisninger til $1, er renset.',
 'spam_deleting' => 'Alle versioner indeholder henvisninger til $1, sletter',
+'simpleantispam-label' => "Anti-spam tjek.
+Udfyld ''' ikke ''' dette!",
 
 # Info page
 'pageinfo-title' => 'Information om "$1"',
index baba696..210078a 100644 (file)
@@ -3282,6 +3282,8 @@ Das liegt wahrscheinlich an einem Link auf eine externe Seite.',
 'spam_reverting' => 'Letzte Version ohne Links zu $1 wiederhergestellt.',
 'spam_blanking' => 'Alle Versionen mit einem Link zu $1 wurden bereinigt.',
 'spam_deleting' => 'Alle Versionen mit einem Link zu $1 wurden gelöscht.',
+'simpleantispam-label' => "Spamschutzprüfung.
+Hier '''NICHTS''' eintragen!",
 
 # Info page
 'pageinfo-title' => 'Informationen zu „$1“',
index bf37f54..aa5ce1f 100644 (file)
@@ -3152,6 +3152,8 @@ Tı eşkeno yew sebeb bınus.',
 'spam_reverting' => 'agêriyeno revizyon o ke tawayê $1 ıney piya çiniyo',
 'spam_blanking' => 'Revizyonê gredê $1 vineyay, wa weng kero',
 'spam_deleting' => 'Revizyonê gredê $1 vineyay, wa besterneyê',
+'simpleantispam-label' => "tehqiqatê Anti-spami.
+no '''de mekerê'''!",
 
 # Info page
 'pageinfo-title' => 'Heq tê "$1"\'i',
index ef04517..d53ebe1 100644 (file)
@@ -2847,6 +2847,8 @@ W zespominanju dajo se pśicyna pódaś.',
 'spam_reverting' => 'Nawrośijo se slědna wersija, kótaraž njejo wopśimjeła wótkaz na $1.',
 'spam_blanking' => 'Wšykne wersije su wopśimowali wótkaze na $1, do rěcha spórane.',
 'spam_deleting' => 'Wšykne wersije z wótkazami do $1 so lašuju',
+'simpleantispam-label' => "Antispamowa kontrola.
+How '''NIC''' zapisaś!",
 
 # Info page
 'pageinfo-title' => 'Informacije za bok "$1"',
index ab4f228..c4daa9a 100644 (file)
@@ -3180,6 +3180,8 @@ $2',
 'spam_reverting' => 'Επαναφορά στην τελευταία έκδοση που δεν περιέχει συνδέσμους στο $1',
 'spam_blanking' => 'Όλες οι αναθεωρήσεις περιείχαν συνδέσμους προς το $1, εξάλειψη',
 'spam_deleting' => 'Διαγραφή όλων των αναθεωρήσεων που περιείχαν συνδέσμους προς το $1',
+'simpleantispam-label' => "Έλεγχος anti-spam.
+'''ΜΗΝ''' το συμπληρώσετε αυτό!",
 
 # Info page
 'pageinfo-title' => 'Πληροφορίες για "$1"',
index ec8f0f2..0c1b560 100644 (file)
@@ -790,7 +790,7 @@ future releases. Also note that since each list value is wrapped in a unique
 'broken-file-category'           => 'Pages with broken file links',
 'categoryviewer-pagedlinks'      => '($1) ($2)', # only translate this message to other languages if you have to change it
 
-'linkprefix' => '/^(.*?)([a-zA-Z\\x80-\\xff]+)$/sD', # only translate this message to other languages if you have to change it
+'linkprefix' => '/^((?>.*(?<![a-zA-Z\\x80-\\xff])))(.+)$/sD', # only translate this message to other languages if you have to change it
 
 'about'         => 'About',
 'article'       => 'Content page',
@@ -3851,6 +3851,8 @@ This is probably caused by a link to a blacklisted external site.',
 'spam_reverting'      => 'Reverting to last revision not containing links to $1',
 'spam_blanking'       => 'All revisions contained links to $1, blanking',
 'spam_deleting'       => 'All revisions contained links to $1, deleting',
+'simpleantispam-label' => "Anti-spam check.
+Do '''NOT''' fill this in!",
 
 # Info page
 'pageinfo-header'                 => '-', # do not translate or duplicate this message to other languages
index 2144c40..b8ec1e5 100644 (file)
@@ -3132,6 +3132,8 @@ Datoj de versioj kaj nomoj de redaktantoj estos preservitaj.
 'spam_reverting' => 'Restarigo de lasta versio ne entenante ligilojn al $1',
 'spam_blanking' => 'Forviŝo de ĉiuj versioj entenantaj ligilojn al $1',
 'spam_deleting' => 'Ĉiuj versioj enhavis ligilojn al $1 - forigante',
+'simpleantispam-label' => 'Kontrolo kontraŭ spamo.
+NE ENIGU ion ajn!',
 
 # Info page
 'pageinfo-title' => 'Informoj por "$1"',
index 05f6804..df55273 100644 (file)
@@ -3259,6 +3259,8 @@ Esto podría estar causado por un enlace a un sitio externo incluido en la lista
 'spam_reverting' => 'Revirtiendo a la última versión que no contenga enlaces a $1',
 'spam_blanking' => 'Todas las revisiones contienen enlaces a $1, blanqueando',
 'spam_deleting' => 'Todas las revisiones que contienen enlaces a $1, en proceso de eliminación',
+'simpleantispam-label' => 'Comprobación anti-spam
+¡NO rellenes esto!',
 
 # Info page
 'pageinfo-title' => 'Información para «$1»',
index 505d090..ecdae41 100644 (file)
@@ -3130,6 +3130,8 @@ See on ilmselt põhjustatud linkimisest mustas nimekirjas olevasse välisvõrguk
 'spam_reverting' => 'Taastan viimase versiooni, mis ei sisalda linke aadressile $1.',
 'spam_blanking' => 'Kõik versioonid sisaldasid linke veebilehele $1. Lehekülg tühjendatud.',
 'spam_deleting' => 'Kustutatud kõik redaktsioonid, mis viitasid aadressile $1.',
+'simpleantispam-label' => "Rämpspostikontroll.
+'''ÄRA''' täida seda välja!",
 
 # Info page
 'pageinfo-title' => 'Teave lehekülje "$1" kohta',
index 7749d0d..739314d 100644 (file)
@@ -2741,6 +2741,8 @@ Baliteke zerrenda beltzean dagoen kanpo lotura batek sortzea arazo hori.',
 'spambot_username' => 'MediaWikiren spam garbiketa',
 'spam_reverting' => '$1(e)rako loturarik ez daukan azken bertsiora itzultzen',
 'spam_blanking' => 'Berrikuspen guztiek $1(e)rako lotura zeukaten, husten',
+'simpleantispam-label' => "Anti-spam egiaztapena.
+Atal hau '''EZ''' bete!",
 
 # Info page
 'pageinfo-title' => '"$1"(r)entzako informazioa',
index 91af22c..81119b8 100644 (file)
@@ -2125,7 +2125,7 @@ $1',
 'uploadstash-nofiles' => 'شما هیچ پروندهٔ انبارشده‌ای ندارید.',
 'uploadstash-badtoken' => 'انجام این اقدام ناموفق بود، احتمالاً به این دلیل که اعتبار ویرایش شما به اتمام رسیده است. دوباره امتحان کنید.',
 'uploadstash-errclear' => 'پاک کردن پرونده‌ها ناموفق بود.',
-'uploadstash-refresh' => 'تازه کردن فهرست پرونده‌ها',
+'uploadstash-refresh' => 'تازهکردن فهرست پرونده‌ها',
 'invalid-chunk-offset' => 'جابجایی نامعتبر قطعه',
 
 # img_auth script messages
@@ -3343,6 +3343,8 @@ $2',
 'spam_reverting' => 'واگردانی به آخرین نسخه‌ای که پیوندی به $1 ندارد.',
 'spam_blanking' => 'تمام نسخه‌ها حاوی پیوند به $1 بود، در حال خالی کردن',
 'spam_deleting' => 'تمام نسخه‌ها حاوی پیوند به $1 بود، در حال حذف',
+'simpleantispam-label' => "بررسی ضدهرزنگاری.
+این قسمت را پر '''نکنید'''!",
 
 # Info page
 'pageinfo-title' => 'اطلاعات در مورد «$1»',
index 1fd5da9..e8cb791 100644 (file)
@@ -3138,6 +3138,7 @@ Voit katsella sivun lähteenä olevaa wikitekstiä.',
 'spam_reverting' => 'Palautettu viimeisimpään versioon, joka ei sisällä linkkejä kohteeseen $1.',
 'spam_blanking' => 'Kaikki versiot sisälsivät linkkejä kohteeseen $1. Sivu tyhjennetty.',
 'spam_deleting' => 'Kaikki versiot sisälsivät linkkejä kohteeseen $1, poistetaan',
+'simpleantispam-label' => "Mainostenvastainen tarkistus. '''ÄLÄ''' täytä tätä!",
 
 # Info page
 'pageinfo-title' => 'Tietoja sivusta $1',
index bb9395f..f733321 100644 (file)
@@ -3270,6 +3270,8 @@ Vous pouvez toutefois en visualiser la source.',
 'spam_reverting' => 'Rétablissement de la dernière version ne contenant pas de lien vers $1',
 'spam_blanking' => 'Toutes les versions contenant des liens vers $1 sont blanchies',
 'spam_deleting' => 'Toutes les versions contenaient des liens vers $1, suppression',
+'simpleantispam-label' => "Vérification anti-spam.
+Ne '''RIEN''' inscrire ici !",
 
 # Info page
 'pageinfo-title' => 'Informations pour « $1 »',
index 7c5a5cb..e83aa9a 100644 (file)
@@ -3194,6 +3194,8 @@ O est probâblament diu a un lim de vers un seto de defôr qu’aparêt sur la l
 'spam_reverting' => 'Rètablissement de la dèrriére vèrsion que contint gins de lim de vers $1',
 'spam_blanking' => 'Totes les vèrsions que contegnont des lims de vers $1 sont blanchies',
 'spam_deleting' => 'Totes les vèrsions que contegnont des lims de vers $1 sont suprimâs',
+'simpleantispam-label' => "Contrôlo anti-spame.
+Enscrîde '''REN''' ique !",
 
 # Info page
 'pageinfo-title' => 'Enformacions por « $1 »',
index a170f92..df89c18 100644 (file)
@@ -3176,6 +3176,8 @@ Isto, probabelmente, se debe a unha ligazón cara a un sitio externo que está n
 'spam_reverting' => 'Revertida á última edición sen ligazóns a "$1"',
 'spam_blanking' => 'Limpáronse todas as revisións con ligazóns a "$1"',
 'spam_deleting' => 'Borráronse todas as revisións con ligazóns a "$1"',
+'simpleantispam-label' => "Comprobación antispam.
+'''NON''' encha isto!",
 
 # Info page
 'pageinfo-title' => 'Información sobre "$1"',
index 46e3e29..1e34d5b 100644 (file)
@@ -2778,6 +2778,7 @@ Die uf em lokale Rächner spychere un derno do uffelade.',
 'spam_reverting' => 'Letschti Version ohni Links zue $1 widerhärgstellt.',
 'spam_blanking' => 'In allene Versione het s Links zue $1 gha, sufer gmacht.',
 'spam_deleting' => 'Alli Versione mit eme Link zue $1 sin glescht woret.',
+'simpleantispam-label' => "Spamschutz-Priefig. Do '''nyt''' yytrage!",
 
 # Info page
 'pageinfo-title' => 'Informatione zue „$1“',
index b29ebcd..6f4adf4 100644 (file)
@@ -2992,6 +2992,8 @@ $1',
 'spambot_username' => 'મિડિયાવિકી સ્પેમ સફાઇ',
 'spam_reverting' => ' $1 પર કડી ન ધરાવતા છેલ્લા ફેરેફાર પર પુનઃ સ્થાપન કરાય છે',
 'spam_blanking' => 'બધા ફેરફારોમાં  $1 પર કડી હતી, આને હટાવી દેવામાં આવે છે',
+'simpleantispam-label' => "સ્પૅમ વિરોધી તપાસ.
+આને '''ન''' ભરશો!",
 
 # Info page
 'pageinfo-title' => ' "$1" માટે માહિતી',
index 4400c4d..ffa2ae2 100644 (file)
@@ -3268,6 +3268,8 @@ $2',
 'spam_reverting' => 'שחזור לגרסה אחרונה שלא כוללת קישורים ל־$1',
 'spam_blanking' => 'כל הגרסאות כוללות קישורים ל־$1, מרוקן את הדף',
 'spam_deleting' => 'כל הגרסאות כוללות קישורים ל־$1, מוחק את הדף',
+'simpleantispam-label' => "בדיקת אנטי־ספאם.
+'''אל''' תמלאו שדה זה!",
 
 # Info page
 'pageinfo-title' => 'מידע על "$1"',
index 1a6a7a0..9787c39 100644 (file)
@@ -3087,6 +3087,8 @@ $1 को बाध्य करने का कारण है: "$2"',
 'spam_reverting' => '$1 को कड़ी ना होने वाले पुराने अवतरण को पुनर्स्थापित कर रहें हैं',
 'spam_blanking' => 'सभी अवतरणोंमें $1 को कड़ियां हैं, पूरा पाठ निकाल रहें हैं',
 'spam_deleting' => 'सभी अवतरणों में $1 की कड़ी थी, हटाया जा रहा है',
+'simpleantispam-label' => "ऍन्टी-स्पैम जाँच.
+इसे भरें '''नहीं'''!",
 
 # Info page
 'pageinfo-title' => '"$1" के लिये जानकारी',
index baeb6b8..aa32c73 100644 (file)
@@ -1443,6 +1443,7 @@ Više informacija možete pronaći u [{{fullurl:{{#Special:Log}}/delete|page={{F
 'recentchangesdays-max' => '(maksimalno $1 {{PLURAL:$1|dan|dana}})',
 'recentchangescount' => 'Zadani broj izmjena koje se prikazuju:',
 'prefs-help-recentchangescount' => 'Ovo uključuje nedavne promjene, stare izmjene, i evidencije.',
+'prefs-help-watchlist-token2' => 'Ovo je tajni ključ prema sažetku vašeg popisa praćenja. Svaki suradnik kojem je poznat, moći će čitati vaš popis praćenih stranica. Ne dijelite ga ni s kim. [[Special:ResetTokens|Kliknite ovdje ako ga želite ponovo postaviti]].',
 'savedprefs' => 'Vaše postavke su sačuvane.',
 'timezonelegend' => 'Vremenska zona:',
 'localtime' => 'Lokalno vrijeme:',
@@ -3091,6 +3092,8 @@ Razlog je vjerojatno vanjska poveznica koja se nalazi na crnom popisu.',
 'spam_reverting' => 'Vraćam na zadnju inačicu koja ne sadrži poveznice na $1',
 'spam_blanking' => 'Sve inačice sadrže poveznice na $1, brišem cjelokupni sadržaj',
 'spam_deleting' => 'Sve inačice sadržale su poveznice na $1, brišem cjelokupni sadržaj',
+'simpleantispam-label' => "Anti-spam provjera.
+'''Ne''' ispunjavajte ovo!",
 
 # Info page
 'pageinfo-title' => 'Podatci o stranici "$1"',
index 55add6b..42eeeb5 100644 (file)
@@ -2901,6 +2901,8 @@ $2',
 'spam_reverting' => 'wróćo na poslednju wersiju, kotraž wotkazy na $1 njewobsahuje',
 'spam_blanking' => 'Wšě wersije z wotkazami do $1 so porjedźeja',
 'spam_deleting' => 'Wšě wersije z wotkazami do $1 so zhašeja',
+'simpleantispam-label' => "Kontrola přećiwo spamej.
+Tu '''ničo''' njezapisać!",
 
 # Info page
 'pageinfo-title' => 'Informacije za stronu "$1"',
index 5ad847a..0795f8f 100644 (file)
@@ -3113,6 +3113,8 @@ Ez valószínűleg egy olyan link miatt van, ami egy feketelistán lévő oldalr
 'spam_reverting' => 'Visszatérés a $1 lapra mutató hivatkozásokat nem tartalmazó utolsó változathoz',
 'spam_blanking' => 'Az összes változat tartalmazott a $1 lapra mutató hivatkozásokat, kiürítés',
 'spam_deleting' => 'Minden változat tartalmazott $1-re mutató hivatkozást, törlöm',
+'simpleantispam-label' => "Spam elleni ellenőrzés.
+'''NE''' töltsd ezt ki!",
 
 # Info page
 'pageinfo-title' => 'Információk a(z) „$1” lapról',
index 438d9a7..353e908 100644 (file)
@@ -3091,6 +3091,8 @@ Le causa es probabilemente un ligamine verso un sito externe que es presente in
 'spam_reverting' => 'Revertite al ultime version que non contine ligamines a $1',
 'spam_blanking' => 'Tote le versiones contineva ligamines a $1. Le pagina es vacuate.',
 'spam_deleting' => 'Tote le versiones contineva ligamines a $1. Le pagina es delite.',
+'simpleantispam-label' => "Verification antispam.
+'''NON''' completa isto!",
 
 # Info page
 'pageinfo-title' => 'Informationes pro "$1"',
index e4442bf..cee748d 100644 (file)
@@ -3218,6 +3218,8 @@ Ini mungkin disebabkan oleh pranala ke situs luar yang termasuk dalam daftar hit
 'spam_reverting' => 'Membatalkan ke versi terakhir yang tak memiliki pranala ke $1',
 'spam_blanking' => 'Semua revisi yang memiliki pranala ke $1, kosong',
 'spam_deleting' => 'Semua revisi yang memiliki pranala ke $1, penghapusan',
+'simpleantispam-label' => "Pemeriksaan anti-spam.
+Masukan ini '''DILARANG'''!",
 
 # Info page
 'pageinfo-title' => 'Informasi untuk "$1"',
index 3449654..1d502cb 100644 (file)
@@ -252,7 +252,7 @@ $messages = array(
 'articlepage' => 'Kitaen ti naglaon a panid',
 'talk' => 'Pagtungtungan',
 'views' => 'Dagiti pangkitaan',
-'toolbox' => 'Kahon ti ramit',
+'toolbox' => 'Ramramit',
 'userpage' => 'Kitaen ti panid ti agar-aramat',
 'projectpage' => 'Kitaen ti panid ti gandat',
 'imagepage' => 'Kitaen ti panid ti papeles',
@@ -498,6 +498,9 @@ Dimo liplipatan a sukatan dagiti kakaykayatam idiay [[Special:Preferences|{{SITE
 'userlogin-resetpassword-link' => 'Iyasentar manen ti kontrasenias',
 'helplogin-url' => 'Help:Panagserrek',
 'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Tulong iti panagserrek]]',
+'userlogin-loggedin' => 'Nakastrekkan a kas ni {{GENDER:$1|$1}}.
+Usaren ti porma dita baba tapno sumrek a kas sabali nga agar-aramat.',
+'userlogin-createanother' => 'Agaramid pay ti sabali a pakabilangan',
 'createacct-join' => 'Ikabil ti pakaammom dita baba.',
 'createacct-another-join' => 'Ikabil ti pakaammo ti baro a pakabilangan dita baba.',
 'createacct-emailrequired' => 'Esurat a pagtaengan',
@@ -2265,10 +2268,12 @@ Kitaen ti $2 para iti pannakrehistro dagiti naudi a naikkat.',
 'deletecomment' => 'Rason:',
 'deleteotherreason' => 'Sabali/maipatinayon a rason:',
 'deletereasonotherlist' => 'Sabali a rason',
-'deletereason-dropdown' => '*Kadawyan a rasrason ti panagikkat
-** Kiddaw ti mannurat
+'deletereason-dropdown' => '* Kadawyan a rasrason ti panagikkat
+** Spam
+** Bandalismo
 ** Panaglabsing iti karbengan ti panagipablaak
-** Bandalismo',
+** Kiddaw ti mannurat
+** Naputed a baw-ing',
 'delete-edit-reasonlist' => 'Urnosen dagiti rason ti panagikkat',
 'delete-toobig' => 'Daytoy a panid ket dakkel ti pakasaritaanna, sumurok a  $1 {{PLURAL:a panagbaliwan|dagiti panagbaliwan}}.
 Ti panagikkat ti kastoy a pammpanid ket naparitan tapno mapawilan ti saan nga inkarkaro a pannakadadael ti {{SITENAME}}.',
@@ -2945,6 +2950,8 @@ Daytoy ket mabalin a gapuanan babaen ti silpo a naiparit ti akin ruar a pagsaada
 'spam_reverting' => 'Ipasubli ti kinaudi a panagbaliw nga awan dagiti linaon a silpo idiay $1',
 'spam_blanking' => 'Dagiti amin a panagbaliw ket aglaon kadagiti silpo idiay $1, iblanko',
 'spam_deleting' => 'Dagiti amin a panagbaliw ket naglaon kadagiti silpo idiay $1, ik-ikkaten',
+'simpleantispam-label' => "Kontra-spam a panagkita.
+ '''Saan''' mo a suratan daytoy!",
 
 # Info page
 'pageinfo-title' => 'Pakaammo para iti "$1"',
index 1350fd5..2e25bdd 100644 (file)
@@ -3036,6 +3036,8 @@ Vinsamlegast reyndu aftur.',
 'spam_reverting' => 'Tek aftur síðustu breytingu sem inniheldur ekki tengil á $1',
 'spam_blanking' => 'Allar útgáfur innihéldu tengla á $1, tæmi síðuna',
 'spam_deleting' => 'Allar útgáfur innihéldu tengla á $1, eyði síðunni',
+'simpleantispam-label' => 'Kæfuvörn.
+Ekki fylla þetta út!',
 
 # Info page
 'pageinfo-title' => 'Upplýsingar um $1',
index f554aed..705b376 100644 (file)
@@ -3115,6 +3115,8 @@ Tutte le operazioni di importazione trans-wiki sono registrate nel [[Special:Log
 'spam_reverting' => "Ripristinata l'ultima versione priva di collegamenti a $1",
 'spam_blanking' => 'Pagina svuotata, tutte le versioni contenevano collegamenti a $1',
 'spam_deleting' => 'Pagina cancellata, tutte le versioni contenevano collegamenti a $1',
+'simpleantispam-label' => "Controllo anti-spam.
+'''NON''' riempire!",
 
 # Info page
 'pageinfo-title' => 'Informazioni per "$1"',
index 29a2f53..94f10e5 100644 (file)
@@ -3344,6 +3344,8 @@ $2',
 'spam_reverting' => '$1へのリンクを含まない最新の版に差し戻し',
 'spam_blanking' => 'すべての版が$1へのリンクを含んでいます。白紙化します。',
 'spam_deleting' => 'すべての版が$1へのリンクを含んでいます。削除します。',
+'simpleantispam-label' => "SPAM防止チェックです。
+決してここに値を入力'''しない'''でください。",
 
 # Info page
 'pageinfo-title' => '「$1」の情報',
index 6c315de..82b4075 100644 (file)
@@ -2728,6 +2728,8 @@ Mbokmanawa iki disebabaké anané pranala jaba sing klebu daftar ireng.',
 'spam_reverting' => 'Mbalèkaké menyang vèrsi pungkasan sing ora ana pranalané menyang $1',
 'spam_blanking' => 'Kabèh révisi sing duwé pranala menyang $1, pangosongan',
 'spam_deleting' => 'Kabèh benahan sing nduwé pranala nèng $1, dibusaki',
+'simpleantispam-label' => "Pamariksan anti-spam.
+'''Aja''' diisèkaké!",
 
 # Info page
 'pageinfo-title' => 'Inpormasi kanggo "$1"',
index ff4feb7..191fd0a 100644 (file)
@@ -3023,6 +3023,8 @@ $2',
 'spam_reverting' => 'დაბრუნება ბოლო ვერსიასთან, რომელიც არ შეიცავს ბმულს $1-თან',
 'spam_blanking' => 'ყველა გვერდი შეიცავს ბმულს $1-გვერდზე. გასუფთავება',
 'spam_deleting' => 'ყველა ვერსია შეიცავდა ბმულს $1-ზე, მიმდინარეობს წაშლა',
+'simpleantispam-label' => "ანტი-სპამის შემოწმება.
+'''არ''' შეავსოთ ის!",
 
 # Info page
 'pageinfo-title' => 'ინფორმაცია „$1“-თვის',
index 7906d14..7098643 100644 (file)
@@ -3302,6 +3302,8 @@ $2',
 'spam_reverting' => '$1(을)를 포함하지 않는 최신 버전으로 되돌림',
 'spam_blanking' => '모든 버전에 $1 링크를 포함하고 있어 차단함',
 'spam_deleting' => '모든 버전에 $1 링크를 포함하고 있어 삭제함',
+'simpleantispam-label' => "스팸 방지 검사입니다.
+이것을 입력하지 '''마세요'''!",
 
 # Info page
 'pageinfo-title' => '"$1" 문서에 대한 정보',
index b9a9ac7..a9e2266 100644 (file)
@@ -3237,6 +3237,7 @@ Esu kam_mer noch en Aanmärkong en „{{int:summary}}“ maache.',
 'spam_reverting' => 'De letzte Version ohne de Links op „$1“ widder zerröckjehollt.',
 'spam_blanking' => 'All die Versione hatte Links op „$1“, die sin jetz erus jemaht.',
 'spam_deleting' => 'All di Versione met Lenks op „$1“ wääde fott jeschmeße',
+'simpleantispam-label' => 'SPAMschotz — donn hee nix endraare!',
 
 # Info page
 'pageinfo-title' => 'Övver di Sigg: „$1“',
index 3838aaf..dd1efc6 100644 (file)
@@ -3036,6 +3036,8 @@ Dëst wahrscheinlech duerch en externe Link den op der schwaarzer Lëscht (black
 'spam_reverting' => 'Déi lescht Versioun ouni Linken op $1 restauréieren.',
 'spam_blanking' => 'An alle Versioune ware Linken op $1, et ass elo alles gebotzt.',
 'spam_deleting' => 'All Versioune mat Linken op $1 gi geläscht',
+'simpleantispam-label' => "Anti-Spam Kontroll.
+Fëllt '''näischt''' hei ënnendrënner aus!",
 
 # Info page
 'pageinfo-title' => 'Informatioun iwwer "$1"',
index 44efb2f..3c042be 100644 (file)
@@ -2777,6 +2777,8 @@ Meistal wörd dit door 'ne zwarte externe link veroorzaak.",
 'spam_reverting' => 'Bezig mit trökdrèjje nao de letste versie die gein verwiezing haet nao $1',
 'spam_blanking' => "Alle wieziginge mit 'ne link nao $1 waere verwiederd",
 'spam_deleting' => 'Alle wieziginge hawwe links nao $1, wuuertj gewösj',
+'simpleantispam-label' => "Antispemcontrole.
+Vol dit veld '''NEET''' in!",
 
 # Info page
 'pageinfo-title' => 'Informatie euver "$1"',
index c29b9dc..1c977f1 100644 (file)
@@ -2957,6 +2957,8 @@ Leidžia pridėti atmetimo priežastį komentaruose',
 'spam_reverting' => 'Atkuriama į ankstesnę versiją, neturinčios nuorodų į $1',
 'spam_blanking' => 'Visos versijos turėjo nuorodų į $1, išvaloma',
 'spam_deleting' => 'Visos versijos turėjo nuorodų į $1, ištrinama',
+'simpleantispam-label' => "Anti-spam patikra.
+'''NE'''pildykite!",
 
 # Info page
 'pageinfo-title' => '„$1“ informacija',
index 87965a9..9580b70 100644 (file)
@@ -2515,6 +2515,8 @@ To visticamāk izraisīja ārēja saite uz melnajā sarakstā esošu interneta v
 'spamprotectionmatch' => 'Spama filtram radās iebildumi pret šo tekstu: $1',
 'spambot_username' => 'MediaWiki surogātpasta tīrīšana',
 'spam_reverting' => 'Atjauno iepriekšējo versiju, kas nesatur saiti uz $1',
+'simpleantispam-label' => "Pretspama pārbaude. 
+ '''NEAIZPILDĪT!'''",
 
 # Info page
 'pageinfo-title' => 'Informācija par "$1"',
index a5ae666..5386a66 100644 (file)
@@ -680,6 +680,7 @@ Mila manaiky cookies ianao raha te hiditra amin'ny {{SITENAME}}.",
 'userlogin-resetpassword-link' => 'Hamerina ny tenimiafinao',
 'helplogin-url' => 'Help:Fidirana',
 'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Fanoroana mikasika ny fidirana]]',
+'userlogin-createanother' => 'Hamorona kaonty hafa',
 'createacct-join' => 'Atsofohy eo ambany ny fampahalalana momba anao.',
 'createacct-another-join' => "Atsofohy eo ambany ny fampahalalana vaovaon'ny kaonty",
 'createacct-emailrequired' => 'Adiresy mailaka :',
@@ -1915,6 +1916,7 @@ Rehefa sivanin'ny mpikambana iray izy ity, ny rakitra izay ahitana santiôna vao
 'listfiles_size' => 'Habe',
 'listfiles_description' => 'Visavisa',
 'listfiles_count' => 'Version',
+'listfiles-latestversion' => 'Filaza ankehitriny',
 'listfiles-latestversion-yes' => 'Eny',
 'listfiles-latestversion-no' => 'Tsia',
 
@@ -1941,8 +1943,12 @@ Rehefa sivanin'ny mpikambana iray izy ity, ny rakitra izay ahitana santiôna vao
 'morelinkstoimage' => "Hijery [[Special:WhatLinksHere/$1|rohy fanampiny]] makany amin'io rakitra io.",
 'linkstoimage-redirect' => '$1 (fihodinana) $2',
 'sharedupload' => "Mety ho rakitra itambarana amin'ny tetikasa hafa ny rakitra $1.",
+'sharedupload-desc-there' => "Avy amin'i $1 ity rakitr aity ary mety ampiasaina any amin'ny tetikasa hafa.
+Jereo [$2 ny pejy famisavisana ilay rakitra] ho an'ny fampahalalana fanampiny.",
 'sharedupload-desc-here' => "Avy amin'i $1 io rakitra io ary mety ampiasain'ny tetikasa hafa.
 Aseho eo ambany ny [$2 famisavisana ilay rakitra].",
+'sharedupload-desc-edit' => "Avy amin'i $1 ity rakitra ity ka mety ampiasaina any amina tetikasa hafa.
+Mety tia hanova ny famisavisany ianao any amin'ny [$2 pejy famisavisana rakitra] any.",
 'filepage-nofile' => 'Tsy nahitana rakitra mitondra io anarana io.',
 'filepage-nofile-link' => 'Tsy misy rakitra mitondra io anarana io, fa afaka [$1 mampiditra azy ianao].',
 'uploadnewversion-linktext' => "Andefa version vaovao n'ity rakitra ity",
@@ -2379,7 +2385,7 @@ ataovy am-pitandremana ity tao ity.",
 Efa nataon'i [[User:$3|$3]] ([[User talk:$3|dinika]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]) ny fanovana farany.",
 'editcomment' => "Toy izao no fanamarihana momba io fanovana io: \"''\$1''\".",
 'revertpage' => "Voafafa ny fanovana ny [[Special:Contributions/$2|$2]] ([[User talk:$2|Dinika]]); voaverina amin'ny votoatiny teo aloha nataon'i [[User:$1|$1]]",
-'revertpage-nouser' => "Manala ny fanovana (nataon'ny anaram-pikambana nesorina), miverina any amin'ny santiona farany nataon'i  [[User:$1|$1]]",
+'revertpage-nouser' => "Manala ny fanovana (nataom-pikambana voaafina), miverina any amin'ny filaza faran'i  [[User:$1|$1]]",
 'rollback-success' => "Fanalàna ny fanovana nataon'i $1 ;
 miverina any amin'ny santiôna farany nataon'i $2.",
 
@@ -2398,7 +2404,7 @@ Ho ann'y fanazavana fanampiny, jereo [[Special:ProtectedPages|ny lisitry ny pejy
 'unprotectedarticle' => "nanala ny fiarovana an'i « [[$1]] »",
 'movedarticleprotection' => 'nanova ny safidim-piarovana : « [[$2]] » lasa « [[$1]] »',
 'protect-title' => "Hanova ny lentam-piarovana ho an'i « $1 »",
-'protect-title-notallowed' => "Hijery ny lentam-piarovana ho an'i «[[$1]]»",
+'protect-title-notallowed' => "Hijery ny lentam-piarovana ho an'i «$1»",
 'prot_1movedto2' => '[[$1]] voaova anarana ho [[$2]]',
 'protect-badnamespace-title' => 'Anaran-tsehatra tsy azo arovana',
 'protect-badnamespace-text' => "Tsy afaka arovana ny pejy ao amin'io anaran-tsehatra io.",
@@ -2903,6 +2909,9 @@ Avereno fanindroany.',
 # JavaScriptTest
 'javascripttest' => 'Fanandramana JavaScript',
 'javascripttest-title' => 'Mandefa fanandramana $1',
+'javascripttest-pagetext-skins' => 'Mifidia skin hanaovana ny fanandramana:',
+'javascripttest-qunit-intro' => "Jereo ny [$1 fanoroana mikasika ny andrana] eo amin'i mediawiki.org.",
+'javascripttest-qunit-heading' => "Tohin'andrana QUnit an'i Javascript eo amin'i MediaWiki",
 
 # Tooltip help for the actions
 'tooltip-pt-userpage' => 'Ny pejinao',
@@ -2922,7 +2931,7 @@ Ampesao ny topi-maso aloha no mihatiry.",
 'tooltip-ca-viewsource' => 'Voaaro ilay pejy. Fa afaka itanao ny voatotiny.',
 'tooltip-ca-history' => "Ny revision natao tamin'ity pejy ity",
 'tooltip-ca-protect' => 'Arovy ity pejy ity',
-'tooltip-ca-unprotect' => "Hanala ny fiarovan'ity pejy ity",
+'tooltip-ca-unprotect' => "Hanova ny lentam-piarovan'ity pejy ity",
 'tooltip-ca-delete' => 'Fafao ity pejy ity',
 'tooltip-ca-undelete' => "Hamerina ny fanovana natao tamin'ity pejy ity talohan'ny famafany",
 'tooltip-ca-move' => 'Ovay anarana ilay pejy',
@@ -2989,7 +2998,8 @@ Mamerina ny version taloha io asa io ary afaka manometraka ny antony anatin'ny a
 'othercontribs' => "Mifototra amin'ny asan'i $1.",
 'others' => 'hafa',
 'siteusers' => '{{SITENAME}} mpikambana $1 miisa $2{{PLURAL:}}',
-'anonusers' => "Ny mpikambana tsy nisoratra anarana $1 ao amin'i {{SITENAME}}",
+'anonusers' => "Ny mpikambana tsy nisoratra anarana $1 ao amin'i {{SITENAME}}{{PLURAL:$2}}",
+'creditspage' => "Fisaorana ho an'ny pejy",
 
 # Spam protection
 'spamprotectiontitle' => "Sivana mpiaro amin'ny spam",
@@ -3009,11 +3019,12 @@ Mamerina ny version taloha io asa io ary afaka manometraka ny antony anatin'ny a
 'pageinfo-length' => 'Halavam-pejy (oktety)',
 'pageinfo-article-id' => 'Laharam-pejy',
 'pageinfo-language' => "Tenin'ny votoatiny",
-'pageinfo-robot-policy' => "Satan'ny motera fikarohana",
-'pageinfo-robot-index' => 'Azo tondroina',
+'pageinfo-robot-policy' => "Fanondroana ataon'ny rôbô",
+'pageinfo-robot-index' => 'Azo atao',
 'pageinfo-robot-noindex' => 'Tsy azo tondroina',
 'pageinfo-views' => "Isan'ny jery",
 'pageinfo-watchers' => "Isan'ny mpandray anjara manaraka",
+'pageinfo-few-watchers' => 'Mpanaraka latsaky ny $1{{PLURAL:}}',
 'pageinfo-redirects-name' => "Fihodinana manketo amin'ity pejy ity",
 'pageinfo-subpages-name' => "Zana-pejin'ity pejy ity",
 'pageinfo-firstuser' => 'Mpamorona ilay pejy',
@@ -3051,6 +3062,7 @@ Mamerina ny version taloha io asa io ary afaka manometraka ny antony anatin'ny a
 'markedaspatrollederrortext' => 'Tsy maintsy misafidy santiôna iray ianao mba hahafahanao manamarika azy ho voamarina.',
 'markedaspatrollederror-noautopatrol' => 'Tsy azonao marihana ho voamarina ny fanovanao.',
 'markedaspatrollednotify' => "Voamarika ho hita ny fanovana natao tamin'i $1.",
+'markedaspatrollederrornotify' => 'Tsy nahamarika azy ho voaara-maso.',
 
 # Patrol log
 'patrol-log-page' => "Laogin'ny fanovana voamarina",
@@ -3221,7 +3233,12 @@ Tokony sary tsy misy na sary tsy izy ny rohy voalohany anaty andalana iray .
 'exif-gpsdestlatitude' => 'Laharam-pehintany tanjona',
 'exif-gpsareainformation' => 'Anaram-paritra GPS',
 'exif-gpsdatestamp' => 'Daty GPS',
+'exif-worldregioncreated' => 'Faritany nangalana ity ilay sary',
 'exif-countrycreated' => 'Firenena nangalana ilay sary',
+'exif-countrycodecreated' => 'Kaontim-pirenena nangalana ilay sary',
+'exif-provinceorstatecreated' => 'Faritany nangalana ilay sary',
+'exif-citycreated' => 'Tanàna nangalana ilay sary',
+'exif-sublocationcreated' => 'Fari-tanàna nangalana ilay sary',
 'exif-worldregiondest' => 'Faritany aseho',
 'exif-countrydest' => 'Firenena aseho',
 'exif-countrycodedest' => 'Kaodim-pirenena aseho',
@@ -3242,6 +3259,7 @@ Tokony sary tsy misy na sary tsy izy ny rohy voalohany anaty andalana iray .
 'exif-contact' => 'Fampahalalana mikasika ny fifandraisana',
 'exif-writer' => 'Mpanoratra',
 'exif-languagecode' => 'Fiteny',
+'exif-iimversion' => 'filaza IIM',
 'exif-iimcategory' => 'Sokajy',
 'exif-iimsupplementalcategory' => 'Sokajy fanampiny',
 'exif-datetimeexpires' => 'Asa ampiasaina aoriany',
@@ -3265,9 +3283,15 @@ Tokony sary tsy misy na sary tsy izy ny rohy voalohany anaty andalana iray .
 'exif-attributionurl' => "Rehefa mampiasa ity asa ity dia asio rohy mankany amin'i",
 'exif-preferredattributionname' => 'Rehefa mampiasa ilay asa, isaory',
 'exif-pngfilecomment' => "Famoahan-kevitra momban'ilay rakitra PNG",
+'exif-disclaimer' => 'Fampitanremana',
 'exif-contentwarning' => 'Fampitandremana mikasika ny votoatiny',
 'exif-giffilecomment' => 'Famoahan-kevitry ny rakirta GIF',
 'exif-intellectualgenre' => 'Karazan-javatra',
+'exif-subjectnewscode' => "Kaodin'ny lohahevitra",
+'exif-event' => 'Zava-mitranga azo sary',
+'exif-organisationinimage' => 'Fikambanana azo sary',
+'exif-personinimage' => 'Olona azo sary',
+'exif-originalimageheight' => "Haambon-tsary talohan'ny nanovana azy",
 
 'exif-copyrighted-true' => "Iharan'ny zom-pamorona",
 'exif-copyrighted-false' => "Toetran'ny zom-pamorona tsy voafaritra",
@@ -3275,10 +3299,20 @@ Tokony sary tsy misy na sary tsy izy ny rohy voalohany anaty andalana iray .
 'exif-unknowndate' => 'Daty tsy fantatra',
 
 'exif-orientation-1' => 'Tsotra',
+'exif-orientation-3' => 'Ahodina 180°',
+'exif-orientation-4' => 'Navadika ambony ambany',
+'exif-orientation-5' => 'Navadika 90° miankavia ary navadika ambony ambany',
+'exif-orientation-6' => 'Navadika 90° miankavia',
+'exif-orientation-7' => 'Navadika 90° miankavanana ary navadika ambony ambany',
+'exif-orientation-8' => 'Navadika 90° miankavanana',
+
+'exif-planarconfiguration-2' => 'Data misaraka',
 
 'exif-componentsconfiguration-0' => 'tsy nahitana',
 
 'exif-exposureprogram-0' => 'Tsy nolazaina',
+'exif-exposureprogram-1' => 'Natao tanana',
+'exif-exposureprogram-2' => 'Fandaharana ara-dalàna',
 
 'exif-subjectdistance-value' => '$1 metatra',
 
@@ -3295,8 +3329,16 @@ Tokony sary tsy misy na sary tsy izy ny rohy voalohany anaty andalana iray .
 'exif-lightsource-9' => "Toetr'andro mazava",
 'exif-lightsource-10' => "Toetr'andro mandrahona",
 'exif-lightsource-11' => 'Haloka',
+'exif-lightsource-17' => 'Jiro manara-penitra A',
+'exif-lightsource-18' => 'Jiro manara-penitra B',
+'exif-lightsource-19' => 'Jiro manara-penitra C',
+'exif-lightsource-24' => "Tangistenina ISO an'ny studio",
+'exif-lightsource-255' => 'Loharanon-kazavana hafa',
 
 # Flash modes
+'exif-flash-fired-0' => 'Tsy nirehitra ny flash',
+'exif-flash-fired-1' => 'Nirehitra ny flash',
+'exif-flash-return-0' => 'Tsy misy stirôbôskôpy mamerina lefa fahitana',
 'exif-flash-mode-3' => 'Toetra aotômatika',
 
 'exif-focalplaneresolutionunit-2' => 'Posy',
@@ -3389,6 +3431,11 @@ Azafady hamafiso fa tena irinao averina hoforonina tokoa ity lahatsoratra ity.",
 'confirm_purge_button' => 'Eka',
 'confirm-purge-top' => "Fafana ve ny cache-n'ity pejy ity?",
 
+# action=watch/unwatch
+'confirm-watch-top' => 'Hanaraka ity pejy ity?',
+'confirm-unwatch-button' => 'OK',
+'confirm-unwatch-top' => "Hanala ity pejy ity amin'ny lisitry ny pejy arahinao?",
+
 # Multipage image navigation
 'imgmultipageprev' => '← pejy nialoha',
 'imgmultipagenext' => 'pejy manaraka →',
@@ -3403,6 +3450,7 @@ Azafady hamafiso fa tena irinao averina hoforonina tokoa ity lahatsoratra ity.",
 'table_pager_first' => 'Pejy voalohany',
 'table_pager_last' => 'Pejy farany',
 'table_pager_limit' => 'Haneho zavatra $1 isaky ny pejy',
+'table_pager_limit_label' => 'Valiny isam-pejy:',
 'table_pager_limit_submit' => 'Hitsidika',
 'table_pager_empty' => 'Tsy nahitana valiny',
 
@@ -3429,7 +3477,11 @@ Andramo ny topi-maso tsotra',
 'watchlistedit-noitems' => 'Tsy misy lohateny ny lisitrao.',
 'watchlistedit-normal-title' => 'Hanova ny lisitra ny pejy arahako maso',
 'watchlistedit-normal-legend' => "Hanala lohateny ao amin'ny lisitra",
+'watchlistedit-normal-explain' => "Aseho eo ambany ny lohateny ao amin'ny lisitry ny pejy arahanao.
+Tsindrio ny boaty eo akaikiny ary tsindrio  « {{int:Watchlistedit-normal-submit}} ».
+Azonao atao ihany koa ny [[Special:EditWatchlist/raw|manova ilay lisitra amin'ny akorany]].",
 'watchlistedit-normal-submit' => 'Hanala ireo lohateny nosafidiana ireo',
+'watchlistedit-normal-done' => "Afaka tamin'ny lisitry ny pejy arahanao ny lohateny $1{{PLURAL:}}",
 'watchlistedit-raw-title' => "Hanova ny lisitra ny pejy arahako maso amin'ny fomba akorany",
 'watchlistedit-raw-legend' => "Fanovana ilay lisitry ny pejy arahina maso amin'ny fomba akorany",
 'watchlistedit-raw-titles' => 'Lohateny :',
@@ -3454,6 +3506,7 @@ Andramo ny topi-maso tsotra',
 'version-hook-subscribedby' => "Nalefan'i",
 'version-version' => '(Santiôna $1)',
 'version-license' => 'Lisansy',
+'version-poweredby-others' => 'hafa',
 'version-software' => 'Rindrankahy voapetraka',
 'version-software-product' => 'Vokatra',
 'version-software-version' => 'Santiôna',
index 1354166..1d804d0 100644 (file)
@@ -2253,6 +2253,8 @@ Sanak hanyo buliah mancaliak sumbernyo sajo',
 # Spam protection
 'spam_blanking' => 'Sado revisi nan ado pautan ka $1, kosong',
 'spam_deleting' => 'Sado revisi nan ado pautan ka $1, dihapuih',
+'simpleantispam-label' => "Pamarisoan anti-spam.
+Masukan ko '''DILARANG'''!",
 
 # Info page
 'pageinfo-title' => 'Informasi untuak "$1"',
index fabf597..4e03715 100644 (file)
@@ -3296,6 +3296,8 @@ $2',
 'spam_reverting' => 'Враќам на последната верзија што не содржи врска до $1',
 'spam_blanking' => 'Сите ревизии содржеа врски до $1. Чистам',
 'spam_deleting' => 'Сите ревизии содржеа врски до $1. Бришам',
+'simpleantispam-label' => "Антиспам проверка.
+'''НЕ''' го пополнувајте ова!",
 
 # Info page
 'pageinfo-title' => 'Информации за „$1“',
index d7f57b1..8693caa 100644 (file)
@@ -3190,6 +3190,8 @@ $1',
 'spam_reverting' => '$1 എന്നതിലേയ്ക്കുള്ള കണ്ണികളില്ലാത്ത അവസാന നാൾപ്പതിപ്പിലേയ്ക്ക് മുൻപ്രാപനം ചെയ്യുന്നു',
 'spam_blanking' => '$1 എന്നതിലേയ്ക്ക് കണ്ണികളുള്ള എല്ലാ നാൾപ്പതിപ്പുകളും ശൂന്യമാക്കുന്നു',
 'spam_deleting' => '$1 എന്നതിലേയ്ക്ക് കണ്ണികളുള്ള എല്ലാ നാൾപ്പതിപ്പുകളും മായ്ക്കുന്നു',
+'simpleantispam-label' => "സ്പാം വിരുദ്ധ പരിശോധന.
+ഇത് '''പൂരിപ്പിക്കരുത്'''",
 
 # Info page
 'pageinfo-title' => '"$1" എന്ന താളിന്റെ വിവരങ്ങൾ',
index b59092b..7a462ba 100644 (file)
@@ -3099,6 +3099,8 @@ $1',
 'spam_reverting' => '$1शी दुवे नसलेल्या गेल्या आवर्तनाकडे परत उलटवत आहे',
 'spam_blanking' => '$1शी दुवे असलेली सर्व आवर्तने,रिक्त केली जात आहेत',
 'spam_deleting' => 'यातील सर्व आवृत्त्यांचे $1शी दुवे आहेत.गाळत आहे',
+'simpleantispam-label' => "चिखलणी विरोधक तपासणी.
+हे भरू '''नका'''!",
 
 # Info page
 'pageinfo-title' => '"$1" च्याबद्दल माहिती',
index b1aa125..2f07107 100644 (file)
@@ -3050,6 +3050,7 @@ Simpan dalam komputer anda dan muat naiknya di sini.',
 'spam_reverting' => 'Membalikkan kepada versi terakhir yang tidak mengandungi pautan ke $1',
 'spam_blanking' => 'Mengosongkan semua semakan yang mengandungi pautan ke $1',
 'spam_deleting' => 'Menghapuskan semua semakan yang mengandungi pautan ke $1',
+'simpleantispam-label' => "Pemeriksaan anti-spam. '''JANGAN''' isi ruangan ini!",
 
 # Info page
 'pageinfo-title' => 'Maklumat untuk "$1"',
index 1df949a..cd16f34 100644 (file)
@@ -3164,6 +3164,8 @@ Dette er sannsynligvis forårsaket av en lenke til et svartelistet eksternt nett
 'spam_reverting' => 'Tilbakestiller til siste versjon uten lenke til $1',
 'spam_blanking' => 'Alle revisjoner inneholdt lenke til $1, tømmer siden',
 'spam_deleting' => 'Sletter alle revisjoner med lenker til $1',
+'simpleantispam-label' => "Antispamsjekk.
+'''IKKE''' fyll inn dette feltet!",
 
 # Info page
 'pageinfo-title' => 'Informasjon om «$1»',
index 2159551..b981c5a 100644 (file)
@@ -2477,6 +2477,7 @@ All Transwiki-Import-Akschonen staht later ok in dat [[Special:Log/import|Import
 'spambot_username' => 'MediaWiki Spam-Oprümen',
 'spam_reverting' => 'Trüchdreiht na de letzte Version ahn Lenken na $1.',
 'spam_blanking' => 'All Versionen harrn Lenken na $1, rein maakt.',
+'simpleantispam-label' => "Antispam-Kuntrull. Hier '''nix''' indragen!",
 
 # Info page
 'pageinfo-title' => 'Informatschoon för "$1"',
index ae86c2f..c4fb71d 100644 (file)
@@ -3335,6 +3335,8 @@ Meestal wordt dit door een externe koppeling op een zwarte lijst veroorzaakt.',
 'spam_reverting' => 'Teruggedraaid naar de laatste versie die geen koppeling bevat naar $1',
 'spam_blanking' => 'Alle versies bevatten een koppeling naar $1. Pagina leeggemaakt',
 'spam_deleting' => 'Alle versies bevatten koppelingen naar $1. Pagina verwijderd',
+'simpleantispam-label' => "Antispamcontrole.
+Vul dit veld '''NIET''' in!",
 
 # Info page
 'pageinfo-title' => 'Informatie over "$1"',
index 38d0da7..fe944b1 100644 (file)
@@ -3060,6 +3060,8 @@ Vitja [//www.mediawiki.org/wiki/Localisation MediaWiki Localisation] og [//trans
 'spam_reverting' => 'Attenderullar til siste versjon utan lenkje til $1',
 'spam_blanking' => 'Alle versjonar inneheldt lenkje til $1, tømmer sida',
 'spam_deleting' => 'Alle versjonane inneheldt lenkjer til $1, slettar.',
+'simpleantispam-label' => "Antispam-kontroll.
+'''IKKJE''' fyll ut dette feltet!",
 
 # Info page
 'pageinfo-title' => 'Informasjon om «$1»',
index 34503b0..d1dd087 100644 (file)
@@ -3070,6 +3070,8 @@ Aquò es probablament causat per un ligam sus lista negra que punta cap a un sit
 'spam_reverting' => 'Restabliment de la darrièra version que conten pas de ligam cap a $1',
 'spam_blanking' => 'Totas las versions que contenon de ligams cap a $1 son blanquidas',
 'spam_deleting' => 'Totas las versions contenonián de ligams cap a $1, supression',
+'simpleantispam-label' => "Verificacion antispam.
+Inscrigatz '''PAS RES''' dedins !",
 
 # Info page
 'pageinfo-title' => 'Informacions per « $1 »',
index 6ab6ef9..4d8a75b 100644 (file)
@@ -3080,6 +3080,8 @@ MediaWiki ବ୍ୟବହାର କରି [[Special:Import|ପୃଷ୍ଠା 
 'spam_reverting' => '$1 ସହ ଯୋଡ଼ା ନଥିବା ଶେଷ ସଂସ୍କରଣକୁ ଲେଉଟାଇ ଦେଉଅଛୁଁ',
 'spam_blanking' => '$1 ସହ ଯୋଡ଼ାଥିବା ସବୁଯାକ ସଂସ୍କରଣ ଖାଲି କରିଦିଆଗଲା',
 'spam_deleting' => '$1 ସହ ଯୋଡ଼ାଥିବା ସବୁଯାକ ସଂସ୍କରଣ ଖାଲି କରିଦିଆଗଲା',
+'simpleantispam-label' => "ସ୍ପାମ-ବିରୋଧି ପରଖ ।
+ଏହାକୁ ଭରନ୍ତୁ '''ନାହିଁ''' !",
 
 # Info page
 'pageinfo-title' => '"$1"ର ବିବରଣୀ',
index c3b48e1..ad44db8 100644 (file)
@@ -2611,17 +2611,21 @@ $1|ਤਬਦੀਲੀ ਹੋਈ|'''$1''' ਤਬਦੀਲੀਆਂ ਹੋਈਆ
 ਸਧਾਰਨ ਝਲਕ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੋ।',
 
 # Watchlist editor
-'watchlistedit-noitems' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿਚ ਕੋਈ ਸਿਰਲੇਖ ਨਹੀਂ ਹਨ।',
+'watchlistedit-numitems' => 'ਗੱਲ-ਬਾਤ ਸਫ਼ਿਆਂ ਤੋਂ ਬਿਨਾਂ, ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿੱਚ {{PLURAL:$1|1 ਸਿਰਲੇਖ ਹੈ|$1 ਸਿਰਲੇਖ ਹਨ}}।',
+'watchlistedit-noitems' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿੱਚ ਕੋਈ ਸਿਰਲੇਖ ਨਹੀਂ ਹਨ।',
 'watchlistedit-normal-title' => 'ਨਿਗਰਾਨੀ-ਲਿਸਟ ਸੋਧੋ',
-'watchlistedit-normal-legend' => 'ਨਿà¨\97ਰਾਨà©\80-ਲਿਸà¨\9f à¨¤à©\8bà¨\82 à¨¸à¨¿à¨°à¨²à©\87à¨\96 ਹਟਾਓ',
+'watchlistedit-normal-legend' => 'ਸਿਰਲà©\87à¨\96ਾà¨\82 à¨¨à©\82à©° à¨¨à¨¿à¨\97ਰਾਨà©\80-ਲਿਸà¨\9f à¨µà¨¿à©±à¨\9aà©\8bà¨\82 ਹਟਾਓ',
 'watchlistedit-normal-submit' => 'ਸਿਰਲੇਖ ਹਟਾਓ',
+'watchlistedit-normal-done' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿੱਚੋਂ {{PLURAL:$1|1 ਸਿਰਲੇਖ ਹਟਾਇਆ ਗਿਆ|$1 ਸਿਰਲੇਖ ਹਟਾਏ ਗਏ}}:',
 'watchlistedit-raw-title' => 'ਕੱਚੀ ਨਿਗਰਾਨ-ਸੂਚੀ ਸੋਧੋ',
-'watchlistedit-raw-legend' => 'ਕੱਚੀ ਨਿਗਰਾਨ-ਸੂਚੀ ਸੋਧੋ',
+'watchlistedit-raw-legend' => 'ਕੱਚੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਸੋਧੋ',
+'watchlistedit-raw-explain' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਵਿੱਚ ਮੌਜੂਦ ਸਫ਼ੇ ਹਟਾਏ ਜਾਂ ਹੋਰ ਜੋੜੇ ਜਾ ਸਕਦੇ ਹਨ। ਹਟਾਉਣ ਜਾਂ ਜੋੜਨ ਤੋਂ ਬਾਅਦ "{{int:Watchlistedit-raw-submit}}" ’ਤੇ ਕਲਿੱਕ ਕਰੋ।
+ਤੁਸੀਂ [[Special:EditWatchlist|ਮਿਆਰੀ ਐਡੀਟਰ]] ਵੀ ਵਰਤ ਸਕਦੇ ਹੋ।',
 'watchlistedit-raw-titles' => 'ਸਿਰਲੇਖ:',
 'watchlistedit-raw-submit' => 'ਨਿਗਰਾਨੀ-ਲਿਸਟ ਤਾਜ਼ੀ ਕਰੋ',
-'watchlistedit-raw-done' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨ-ਸੂਚੀ ਅੱਪਡੇਟ ਹੋ ਗਈ ਹੈ।',
-'watchlistedit-raw-added' => '{{PLURAL:$1|1 title was|$1 titles were}} ਸ਼ਾਮਲ:',
-'watchlistedit-raw-removed' => '{{PLURAL:$1|1 title was|$1 titles were}} ਹਟਾਓ:',
+'watchlistedit-raw-done' => 'ਤੁਹਾਡੀ ਨਿਗਰਾਨੀ-ਲਿਸਟ ਅੱਪਡੇਟ ਹੋ ਗਈ ਹੈ।',
+'watchlistedit-raw-added' => '{{PLURAL:$1|1 ਸਿਰਲੇਖ ਸ਼ਾਮਲ ਕੀਤਾ|$1 ਸਿਰਲੇਖ ਸ਼ਾਮਲ ਕੀਤੇ}}:',
+'watchlistedit-raw-removed' => '{{PLURAL:$1|1 ਸਿਰਲੇਖ ਹਟਾਇਆ|$1 ਸਿਰਲੇਖ ਹਟਾਏ}}:',
 
 # Watchlist editing tools
 'watchlisttools-view' => 'ਸਬੰਧਤ ਤਬਦੀਲੀਆਂ ਵੇਖੋ',
index 289e770..a9f7e2d 100644 (file)
@@ -769,6 +769,9 @@ Nie zapomnij dostosować [[Special:Preferences|preferencji]].',
 'userlogin-resetpassword-link' => 'Nie pamiętasz hasła?',
 'helplogin-url' => 'Help:Logowanie',
 'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Pomoc z logowaniem]]',
+'userlogin-loggedin' => 'Zalogowano jako {{GENDER:$1|$1}}.
+Użyj poniższego formularza, aby zalogować się jako inny użytkownik.',
+'userlogin-createanother' => 'Załóż nowe konto',
 'createacct-join' => 'Wpisz poniżej swoje dane.',
 'createacct-another-join' => 'Wprowadź szczegóły nowego konta poniżej.',
 'createacct-emailrequired' => 'Adres e‐mail',
@@ -3209,6 +3212,8 @@ Najprawdopodobniej zostało to spowodowane przez link do zewnętrznej strony int
 'spam_reverting' => 'Przywracanie ostatniej wersji nie zawierającej linków do $1',
 'spam_blanking' => 'Wszystkie wersje zawierały odnośniki do $1. Czyszczenie strony.',
 'spam_deleting' => 'Wszystkie wersje zawierały linki do $1, usuwam.',
+'simpleantispam-label' => "Filtr antyspamowy.
+'''NIE''' wpisuj tu nic!",
 
 # Info page
 'pageinfo-title' => 'Informacje o „$1“',
index c9bce10..19b7c5e 100644 (file)
@@ -2924,6 +2924,8 @@ Sòn a l'é motobin belfé che a sia rivà përchè a-i era n'anliura a un sit e
 'spam_reverting' => "Butà andaré a l'ùltima version che a l'avèissa pa andrinta dj'anliure a $1",
 'spam_blanking' => "Pàgina dësvujdà, che tute le version a l'avìo andrinta dj'anliure a $1",
 'spam_deleting' => 'Scancelà, dagià che tute le revision a contnisìo dle liure a $1',
+'simpleantispam-label' => "Control anti-spam.
+Vemp '''PA''' sòn-sì!",
 
 # Info page
 'pageinfo-title' => 'Anformassion për «$1»',
index 5af5a56..01de94d 100644 (file)
@@ -2664,6 +2664,8 @@ $1',
 'spambot_username' => 'میڈیاوکی سپام سفائی',
 'spam_reverting' => 'آخری ریوین ول جیدے چ $1 دے جوڑ ناں ہون۔',
 'spam_blanking' => 'سارے ریوین جناں چ $1 نوں جوڑ نیں، طاف کیتا جاریا اے۔',
+'simpleantispam-label' => 'سپام روک پھاٹک
+ایدے تے ناں لکھو۔',
 
 # Info page
 'pageinfo-title' => '"$1" لئی جانکاری',
index 9a6ff9e..51182bd 100644 (file)
@@ -3215,6 +3215,8 @@ Este bloqueio foi provavelmente causado por um link para um site externo que con
 'spam_reverting' => 'A reverter para a última revisão que não contém links para $1',
 'spam_blanking' => 'Todas as revisões continham links para $1; a esvaziar',
 'spam_deleting' => 'Todas as revisões continham links para $1; a eliminar',
+'simpleantispam-label' => "Verificação de spam
+'''NÃO''' preencha isto!",
 
 # Info page
 'pageinfo-title' => 'Informações sobre "$1"',
index d60517a..9770199 100644 (file)
@@ -61,6 +61,7 @@
  * @author Sir Lestaty de Lioncourt
  * @author Teles
  * @author TheGabrielZaum
+ * @author Titoncio
  * @author Urhixidur
  * @author Vivaelcelta
  * @author Vuln
@@ -3212,6 +3213,8 @@ Tal bloqueio foi provavelmente causado por uma ligação para um ''website'' ext
 'spam_reverting' => 'Revertendo para a última versão que não contém links para $1',
 'spam_blanking' => 'Todas revisões contendo links para $1, limpando',
 'spam_deleting' => 'Eliminada por todas as suas edições conterem links para $1',
+'simpleantispam-label' => "Verificação de spam
+'''NÃO''' preencha isto!",
 
 # Info page
 'pageinfo-title' => 'Informações sobre "$1"',
index bbe797c..a8b66b2 100644 (file)
@@ -7990,6 +7990,9 @@ Used when a page is deleted because all revisions contained a particular link.
 
 Parameters:
 * $1 - a spammed domain name',
+'simpleantispam-label' => 'Used as label for the input box in "Edit" page.
+
+The label and the input box are always hidden.',
 
 # Info page
 'pageinfo-title' => 'Page title for action=info. Parameters:
index c03c5bf..4d7ca96 100644 (file)
@@ -596,6 +596,11 @@ Allin sapaq p'anqakunataqa tarinki [[Special:SpecialPages|Sapaq p'anqakuna]] nis
 # General errors
 'error' => 'Pantasqa',
 'databaseerror' => 'Willañiqintin pantasqa',
+'databaseerror-text' => "Willañiqintin maskana pantasqam tukurqan. Llamp'u kaqpi pantasqachá kachkan.",
+'databaseerror-textcl' => 'Willañiqintin maskana pantasqam tukurqan.',
+'databaseerror-query' => 'Maskana: $1',
+'databaseerror-function' => 'Ruray paqtachi: $1',
+'databaseerror-error' => 'Pantasqa: $1',
 'laggedslavemode' => "'''Paqtataq''': Kay p'anqapiqa manaraqchá kachkanchu aswan qayna musuqchasqakuna.",
 'readonly' => "Willañiqintinqa hark'asqam",
 'enterlockreason' => "Qillqamuy imarayku hark'asqa karqan, hayk'appas manañachá hark'asqachu kanqa",
@@ -629,6 +634,7 @@ P\'anqaqa pipapas qullusqanñachá.',
 'cannotdelete-title' => 'Manam atinichu "$1" sutiyuq p\'anqata qulluyta',
 'delete-hook-aborted' => "Ch'iwinam qulluyta t'ipirqan.
 Manam nirqanchu imarayku.",
+'no-null-revision' => 'Manam atinichu "$1" p\'anqapaq musuq ch\'usaq musuqchasqata kamariyta.',
 'badtitle' => "P'anqap sutinqa manam allinchu",
 'badtitletext' => "Kay p'anqap sutinqa manam allinchu, mana allin interwiki t'inkichá icha ch'usaqchá, p'anqa sutipaq mana saqillasqa sananchayuqchá.",
 'perfcached' => "Kay qatiq willakunaqa ''cache'' nisqa pakasqa hallch'apim kachkan, chayrayku manañachá musuqchasqachu. {{PLURAL:$1|Huklla|$1-lla}} taripasqam pakasqa hallch'api aypalla kachkan, manam aswanchu.",
@@ -656,6 +662,8 @@ $2",
 'customjsprotected' => "Manam saqillasunkichu kay JavaScript p'anqata llamk'apuyta, huk ruraqpa kikin tiyachisqankunayuq kaptinmi.",
 'mycustomcssprotected' => "Kay CSS p'anqataqa manam llamk'apuyta atinkichu.",
 'mycustomjsprotected' => "Kay JavaScript p'anqataqa manam llamk'apuyta atinkichu.",
+'myprivateinfoprotected' => "Manam saqillasqachu kanki kikiykip akuna willaykikunata llamk'apunaykipaq.",
+'mypreferencesprotected' => "Manam saqillasqachu kanki allinkachinaykikunata llamk'apunaykipaq.",
 'ns-specialprotected' => "{{ns:special}} suti k'itipi p'anqakunaqa manam llamk'apunallachu.",
 'titleprotected' => "Kay p'anqa sutitaqa [[User:$1|$1]] sutiyuq ruraq kamariymanta hark'arqanmi, kayraykum nispa: ''$2''.",
 'filereadonlyerror' => 'Manam atinichu "$1" sutiyuq willañiqita hukchayta, "$2" sutiyuq willañiqi churamuna ñawirillanapaq kachkaptinmi.
@@ -681,6 +689,7 @@ Ama qunqaychu [[Special:Preferences|{{SITENAME}} allinkachinaykikunata]] hukchay
 'yourname' => 'Ruraq sutiyki:',
 'userlogin-yourname' => 'Ruraqpa sutin',
 'userlogin-yourname-ph' => 'Ruraqpa sutiykita yaykuchiy',
+'createacct-another-username-ph' => 'Ruraqpa sutinta yaykuchiy',
 'yourpassword' => 'Yaykuna rimayki',
 'userlogin-yourpassword' => 'Yaykuna rima',
 'userlogin-yourpassword-ph' => 'Yaykuna rimaykita yaykuchiy',
@@ -713,10 +722,12 @@ Ama qunqaychu [[Special:Preferences|{{SITENAME}} allinkachinaykikunata]] hukchay
 'userlogin-resetpassword-link' => 'Yaykuna rimaykita kutichiy',
 'helplogin-url' => 'Help:Yaykuy',
 'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Yaykunapaq yanapa]]',
+'userlogin-createanother' => 'Huk rakiqunata kamariy',
 'createacct-join' => 'Kay qatiqpi willaykita yaykuchiy.',
 'createacct-emailrequired' => 'E-chaski imamayta',
 'createacct-emailoptional' => 'E-chaski imamayta (munaspayki)',
 'createacct-email-ph' => 'E-chaski imamaytaykita yaykuchiy',
+'createacct-another-email-ph' => 'E-chaski imamaytata yaykuchiy',
 'createaccountmail' => "Kikinmanta tukusqa mit'alla yaykuna rimata llamk'achispa akllasqa e-chaski imamaytaman kachay",
 'createacct-realname' => 'Chiqap suti (munaspayki)',
 'createaccountreason' => 'Kayrayku:',
@@ -725,6 +736,7 @@ Ama qunqaychu [[Special:Preferences|{{SITENAME}} allinkachinaykikunata]] hukchay
 'createacct-captcha' => 'Amachana llanchiy',
 'createacct-imgcaptcha-ph' => 'Hanaqpi rikusqayki qillqata yaykuchiy',
 'createacct-submit' => 'Rakiqunaykita kamariy',
+'createacct-another-submit' => 'Huk rakiqunata kamariy',
 'createacct-benefit-heading' => '{{SITENAME}}taqa qam hina runakunam ruran.',
 'createacct-benefit-body1' => "{{PLURAL:$1|llamk'apusqa|llamk'apusqakuna}}",
 'createacct-benefit-body2' => "{{PLURAL:$1|p'anqa|p'anqakuna}}",
@@ -788,6 +800,7 @@ Kay willay pantasqa kaptinqa, qhawarparillay.',
 'login-abort-generic' => 'Yaykuykachaspayki manam ayparqankichu - Allqasqa',
 'loginlanguagelabel' => 'Rimay: $1',
 'suspicious-userlogout' => "Lluqsiy mañakuyniykiqa mananchasqam karqan, waqllisqa wamp'unamanta icha pakaq proksimanta kachasqa kaspanchá.",
+'createacct-another-realname-tip' => "* Chiqap sutiqa munanallapaqmi. Quwaptiykiqa, llamk'apusqakunam paywan sananchasqa kanqa.",
 
 # Email sending
 'php-mail-error-unknown' => 'Mana riqsisqa pantasqa PHP mail() rurananpi',
@@ -864,6 +877,15 @@ Mit'alla yaykuna rima: $2",
 'changeemail-submit' => 'E-chaskita wakinchay',
 'changeemail-cancel' => 'Ama niy',
 
+# Special:ResetTokens
+'resettokens' => 'Llawikunata kutichiy',
+'resettokens-no-tokens' => 'Manam kanchu kutichina llawikuna.',
+'resettokens-legend' => 'Llawikunata kutichiy',
+'resettokens-tokens' => 'Llawikuna:',
+'resettokens-token-label' => '$1 (kunan chani: $2)',
+'resettokens-done' => 'Llawikunaqa kutichimusqañam.',
+'resettokens-resetbutton' => 'Akllasqa llawikunata kutichimuy',
+
 # Edit page toolbar
 'bold_sample' => 'Yanasapa qillqa',
 'bold_tip' => 'Yanasapa qillqa',
@@ -1087,6 +1109,7 @@ Chay niykunaqa manam chaninchasqachu.",
 'undo-failure' => "Manam atinichu llamk'apusqata kutichiyta, huk ruraqtaq musuqta llamk'apurquptinñam.",
 'undo-norev' => "Manam atinichu llamk'apusqata kutichiyta, mana kaptinmi icha qullusqa kaptinmi.",
 'undo-summary' => '[[Special:Contributions/$2|$2]]-pa $1 hukchasqanta kutichisqa ([[User talk:$2|rimay]])',
+'undo-summary-username-hidden' => 'Pakasqa ruraqpa $1 nisqa musuqchasqata kutichiy',
 
 # Account creation failure
 'cantcreateaccounttitle' => 'Manam atinichu rakiqunata kichayta',
@@ -1264,6 +1287,7 @@ Takyachikuy kay hukchayqa allin wiñay kawsay ñiqita ama waqllichunchu chaylla.
 'compareselectedversions' => "Akllasqa llamk'apusqakunata wakichay",
 'showhideselectedversions' => 'Akllasqa musuqchasqakunata rikuchiy/pakay',
 'editundo' => 'kutichiy',
+'diff-empty' => '(Manam wak hina kanchu)',
 'diff-multi' => "({{PLURAL:$2|Huk ruraqpa|$2 ruraqpa}} {{PLURAL:$1|chawpipi huk llamk'apusqanqa manam rikuchisqachu|chawpipi $1 llamk'apusqankunaqa manam rikuchisqachu}})",
 'diff-multi-manyusers' => "({{PLURAL:$2|Hukmanta|$2-manta}} aswan ruraqkunap {{PLURAL:$1|chawpipi huk llamk'apusqanqa manam rikuchisqachu|chawpipi $1 llamk'apusqankunaqa manam rikuchisqachu}})",
 'difference-missing-revision' => "Kay wakin kaymanta ($1) {{PLURAL:$2|huk musuqchasqa|$2 musuqchasqakuna}} manam tarisqachu.
@@ -1435,6 +1459,8 @@ $1 {{PLURAL:$1|sanampamanta|sanampakunamanta}} aswan pisi kananmi.',
 'prefs-dateformat' => "P'unchaw rikch'ay",
 'prefs-timeoffset' => 'Pacha wakinyay',
 'prefs-advancedediting' => 'Sapsi akllanakuna',
+'prefs-editor' => "P'anqachaq",
+'prefs-preview' => 'Ñawpaqta qhawallay',
 'prefs-advancedrc' => 'Ñawparikusqa akllanakuna',
 'prefs-advancedrendering' => 'Ñawparikusqa akllanakuna',
 'prefs-advancedsearchoptions' => 'Ñawparikusqa akllanakuna',
@@ -1442,6 +1468,7 @@ $1 {{PLURAL:$1|sanampamanta|sanampakunamanta}} aswan pisi kananmi.',
 'prefs-displayrc' => 'Akllanakunata rikuchiy',
 'prefs-displaysearchoptions' => 'Akllanakunata rikuchiy',
 'prefs-displaywatchlist' => 'Akllanakunata rikuchiy',
+'prefs-tokenwatchlist' => 'Llawi',
 'prefs-diffs' => 'Wakin kaykuna',
 
 # User preference: email validation using jQuery
@@ -1536,12 +1563,18 @@ $1 {{PLURAL:$1|sanampamanta|sanampakunamanta}} aswan pisi kananmi.',
 'right-unblockself' => "Kikinta hark'asqamanta qispikuy",
 'right-protect' => "Amachasqa kachkayta hukchay, ch'aqtasqa amachasqa p'anqakunata llamk'apuy",
 'right-editprotected' => 'Amachasqa p\'anqakunata "{{int:protect-level-sysop}}" hina llamk\'apuy',
+'right-editsemiprotected' => '"{{int:protect-level-autoconfirmed}}" hina amachasqa p\'anqakunata llamk\'apuy',
 'right-editinterface' => "Ruraqpaq uyapurata llamk'apuy",
 'right-editusercssjs' => "Huk ruraqkunap CSS, JS willañiqinkunata llamk'apuy",
 'right-editusercss' => "Huk ruraqkunap CSS willañiqinkunata llamk'apuy",
 'right-edituserjs' => "Huk ruraqkunap JS willañiqinkunata llamk'apuy",
 'right-editmyusercss' => "Kikiykip ruraqpaq CSS willañiqiykikunata llamk'apuy",
 'right-editmyuserjs' => "Kikiykip ruraqpaq JavaScript willañiqiykikunata llamk'apuy",
+'right-viewmywatchlist' => 'Kikiykip watiqasqayki sutisuyuykita qhaway',
+'right-editmywatchlist' => "Kikiykip watiqasqayki sutisuyuykita llamk'apuy. Paqtataq, huk ruranakunaqa p'anqakunata yapanqaraqmi kay hañi mana kaptinpas.",
+'right-viewmyprivateinfo' => 'Kikiykip akuna willaykikunata qhaway (ahinataq e-chaski imamaytayki, chiqap sutiyki)',
+'right-editmyprivateinfo' => "Kikiykip akuna willaykikunata llamk'apuy (ahinataq e-chaski imamaytayki, chiqap sutiyki)",
+'right-editmyoptions' => "Kikiykip allinkachinaykikunata llamk'apuy",
 'right-rollback' => "Huk p'anqapi qhipaq llamk'apuqpa hukchasqankunata utqaylla kutichiy",
 'right-markbotedits' => "Kutichisqa llamk'apusqakunata rurana antachap llamk'apusqankunata hina sananchay",
 'right-noratelimit' => 'Achura saywakunap manam chayachisqanchu',
@@ -1603,12 +1636,19 @@ $1 {{PLURAL:$1|sanampamanta|sanampakunamanta}} aswan pisi kananmi.',
 'action-userrights-interwiki' => "hawa wikikunapi ruraqkunap hayñinkunata llamk'apuy",
 'action-siteadmin' => "willañiqintinta hark'ay icha paskay",
 'action-sendemail' => 'e-chaskikunata kachay',
+'action-editmywatchlist' => "watiqasqayki sutisuyuta llamk'apuy",
+'action-viewmywatchlist' => 'watiqasqayki sutisuyuta qhaway',
+'action-viewmyprivateinfo' => 'kikiykip akuna willaykikunata qhaway',
+'action-editmyprivateinfo' => "kikiykip akuna willaykikunata llamk'apuy",
 
 # Recent changes
 'nchanges' => '$1 {{PLURAL:$1|hukchasqa|hukchasqakuna}}',
+'enhancedrc-since-last-visit' => '$1 {{PLURAL:$1|qhipaq watukusqamantapacha}}',
+'enhancedrc-history' => 'wiñay kawsay',
 'recentchanges' => 'Ñaqha hukchasqa',
 'recentchanges-legend' => 'Ñaqha hukchasqapaq allinkachinakuna',
 'recentchanges-summary' => "Kay p'anqapiqa aswan qhipaq ñaqha hukchasqakunam.",
+'recentchanges-noresult' => "Kay taripanakama hukchasqakunaqa akllasqa mit'api manam kanchu.",
 'recentchanges-feed-description' => 'Kay mikhuchinapi wikipi qhipaq ñaqha hukchasqakunata qatiy.',
 'recentchanges-label-newpage' => "Kayta llamk'apuptiykim musuq p'anqam tukukurqun",
 'recentchanges-label-minor' => "Kayqa aslla llamk'apuymi",
@@ -1885,6 +1925,10 @@ Lliwmanta aswan alliku kanapaqqa, img_auth.php manam atinchu.',
 'listfiles_size' => 'Hatun kay',
 'listfiles_description' => "T'iktuna",
 'listfiles_count' => 'Musuqchasqakuna',
+'listfiles-show-all' => "Rikchakunamanta mawk'a musuqchasqakunata ch'aqtay",
+'listfiles-latestversion' => 'Kunan musuqchasqa',
+'listfiles-latestversion-yes' => 'Arí',
+'listfiles-latestversion-no' => 'Mana',
 
 # File description page
 'file-anchor-link' => 'Rikcha',
@@ -1979,6 +2023,13 @@ Ama hina kaspa, [$2 willañiqi ch'uyanchana p'anqata] qhaway astawan willachikun
 'randompage' => "Mayninpi p'anqa",
 'randompage-nopages' => "Manam ima p'anqapas kanchu kay suti {{PLURAL:$2|k'itipi|k'itikunapi}}: $1.",
 
+# Random page in category
+'randomincategory' => "Katiguriyapi kikinmanta p'anqa",
+'randomincategory-invalidcategory' => '"$1" nisqaqa katiguriyapaq manam allin sutinchu.',
+'randomincategory-nopages' => "[[:Category:$1|$1]] katiguriyapiqa manam p'anqakuna kanchu.",
+'randomincategory-selectcategory' => "Katiguriyamanta kikinmanta p'anqata chaskiy: $1 $2.",
+'randomincategory-selectcategory-submit' => 'Riy',
+
 # Random redirect
 'randomredirect' => "Mayninpi pusapuna p'anqa",
 'randomredirect-nopages' => 'Manam kanchu "$1" nisqa suti k\'itipi pusapuna p\'anqakuna.',
@@ -3794,7 +3845,10 @@ MediaWikitaqa mast'ariyku runakunata yanapanapaqmi, ichataq MANAM FIYAKUYTA ATIY
 'tags-tag' => 'Unanchachap sutin',
 'tags-display-header' => "Hukchasqakunamanta sutisuyup rikch'akuynin",
 'tags-description-header' => "Sut'inmanta hunt'a ch'uyanchaynin",
+'tags-active-header' => 'Ruraqllachu?',
 'tags-hitcount-header' => 'Unanchasqa hukchasqakuna',
+'tags-active-yes' => 'Arí',
+'tags-active-no' => 'Mana',
 'tags-edit' => "llamk'apuy",
 'tags-hitcount' => '$1 {{PLURAL:$1|hukchasqa|hukchasqakuna}}',
 
@@ -3950,4 +4004,10 @@ Mana chayqa, kay qatiqpi kaq hunt'ana p'anqatam llamk'achiyta atinki. Willapuyni
 # Image rotation
 'rotate-comment' => "Rikch'aqa pacha rikuchiqwan $1 {{PLURAL:$1|k'atma}} muyusqam",
 
+# Limit report
+'limitreport-cputime-value' => '$1 {{PLURAL:$1|sikundu|sikundukuna}}',
+'limitreport-walltime-value' => '$1 {{PLURAL:$1|sikundu|sikundukuna}}',
+'limitreport-postexpandincludesize-value' => '$1/$2 {{PLURAL:$2|byte}}',
+'limitreport-templateargumentsize-value' => '$1/$2 {{PLURAL:$2|byte}}',
+
 );
index 269298f..4544767 100644 (file)
@@ -3181,6 +3181,8 @@ Permite adăugarea unui motiv în descrierea modificărilor',
 'spam_reverting' => 'Revenire la ultima versiune care nu conține legături către $1',
 'spam_blanking' => 'Toate versiunile conținând legături către $1 au fost golite',
 'spam_deleting' => 'Toate versiunile conținând legături către $1 au fost șterse',
+'simpleantispam-label' => "Verificare antispam.
+'''NU''' completați !",
 
 # Info page
 'pageinfo-title' => 'Informații pentru „$1”',
index 0eab3d6..bc1f773 100644 (file)
@@ -2991,6 +2991,8 @@ Stu fatte ha state causate da 'nu collegamende a 'nu site esterne ca appartene a
 'spam_reverting' => "Turnanne a l'urtema revisione no ge condiene collegaminde a $1",
 'spam_blanking' => 'Tutte le revisiune condènene collegaminde a $1, vacande',
 'spam_deleting' => 'Tutte le revisiune condènene collegaminde a $1, stoche a scangelle',
+'simpleantispam-label' => "Verifiche andi-spam.
+'''NO''' anghiè quiste!",
 
 # Info page
 'pageinfo-title' => '\'Mbormaziune pe "$1"',
index a595abe..0b695aa 100644 (file)
@@ -3336,6 +3336,8 @@ The wiki server can't provide data in a format your client can read.",
 'spam_reverting' => 'Откат к последней версии, не содержащей ссылки на $1',
 'spam_blanking' => 'Все версии содержат ссылки на $1, очистка',
 'spam_deleting' => 'Все версии содержали ссылки на $1, производится удаление',
+'simpleantispam-label' => 'Анти-спам проверка.
+НЕ заполняйте это!',
 
 # Info page
 'pageinfo-title' => 'Сведения по «$1»',
index a82354e..210df3b 100644 (file)
@@ -2922,6 +2922,8 @@ $2',
 'spam_reverting' => 'Реверт на послїдню верзію необсягуючу одказы на $1',
 'spam_blanking' => 'Вшыткы ревізії обсяговали одказы на $1, выпорожнєны',
 'spam_deleting' => 'Вшыткы ревізії обсяговали одказы на $1, змазане',
+'simpleantispam-label' => "Перевірка на спам.
+'''НЕ''' заповнюйте тото!",
 
 # Info page
 'pageinfo-title' => 'Інформація про "$1"',
index 15635a1..1272862 100644 (file)
@@ -2974,6 +2974,8 @@ $2 इति प्रकारस्य अवरोधं कर्तुं 
 'spam_reverting' => '$1 इत्यनेन नानुबद्धनां प्राचीनपुनरावृत्तीनां पुनस्थापनं कुर्वन्ति ।',
 'spam_blanking' => 'सर्वाः पुनरावृत्तयः $1 इत्यस्य अनुबन्धाः पूर्णपाठाः अपनीयन्ते ।',
 'spam_deleting' => 'सर्वाः पुनरावृत्तयः $1 इत्यस्य अनुबन्धाः । पूर्णपाठाः अपनीयन्ते ।',
+'simpleantispam-label' => "अनिष्टसन्देशविरोधपरीक्षणम् ।
+अस्मिन् '''नहि''' पूर्यताम् !",
 
 # Info page
 'pageinfo-title' => '"$1" कृते सूचनाः ।',
index ebc7d1c..2990ac8 100644 (file)
@@ -2896,6 +2896,8 @@ $2',
 'spam_reverting' => 'Манна: $1 ыйынньыга суох бүтэһик торуму сөргүтүү (төннөрүү)',
 'spam_blanking' => 'Бары торумнар манна "$1" ыйынньыктаахтар, барытын суох оҥоруу',
 'spam_deleting' => 'Бары барыллар манна "$1" сигэнэллэр эит, сотуу бара турар',
+'simpleantispam-label' => "Анти-спам бэрэбиэркэтэ.
+Маны '''толорумаҥ'''!",
 
 # Info page
 'pageinfo-title' => '"$1" туһунан',
index 704055d..4a30265 100644 (file)
@@ -2950,6 +2950,8 @@ $1 ගේ වාරණයට හේතුව මෙය වේ: "$2"',
 'spambot_username' => 'මීඩියාවිකි ස්පෑම් ඉවත්කිරීම',
 'spam_reverting' => ' $1 හට සබැඳියන් නොමැති අවසන් අනුවාදය වෙත ප්‍රතිවර්තනය වෙමින්',
 'spam_blanking' => 'සියළු සංශෝධනයන්හි  $1 වෙතවූ සබැඳියන් අඩංගු විය, හිස්කරමින්',
+'simpleantispam-label' => "ප්‍රති-ස්පෑම පරීක්‍ෂාව.
+කරුණාකර මෙය පුරවන්න '''එපා'''!",
 
 # Info page
 'pageinfo-title' => '"$1" සඳහා තොරතුරු',
index 65f1589..fb9d616 100644 (file)
@@ -3136,6 +3136,8 @@ Pravdepodobne to spôsobil odkaz na externú internetovú lokalitu, ktorá sa na
 'spam_reverting' => 'Vraciam poslednú verziu, ktorá neobsahuje odkazy na $1',
 'spam_blanking' => 'Všetky revízie obsahovali odkaz na $1, odstraňujem obsah',
 'spam_deleting' => 'Všetky revízie obsahovali odkaz na $1, odstraňuje sa',
+'simpleantispam-label' => "Antispamová kontrola.
+'''NEVYPĹŇAJTE''' nasledovné!",
 
 # Info page
 'pageinfo-title' => 'Informácie o „$1“',
index 040fef7..5762fad 100644 (file)
@@ -3095,6 +3095,8 @@ Omogoča vnos pojasnila v povzetku urejanja.',
 'spam_reverting' => 'Vračanje na zadnjo redakcijo brez povezav na $1',
 'spam_blanking' => 'Vse redakcije so vsebovale povezave na $1, izpraznjujem',
 'spam_deleting' => 'Vse redakcije so vsebovale povezave na $1, brišem',
+'simpleantispam-label' => "Preverjanje proti smetju.
+'''NE''' izpolnite tega!",
 
 # Info page
 'pageinfo-title' => 'Informacije o »$1«',
index 35a67cb..b3aff4e 100644 (file)
@@ -2933,6 +2933,8 @@ Ju lutemi provoni përsëri.',
 'spam_reverting' => "U kthye tek versioni i fundit që s'ka lidhje tek $1",
 'spam_blanking' => 'U boshatis sepse të gjitha versionet kanë lidhje tek $1',
 'spam_deleting' => 'Të gjitha inspektimet përmbanin lidhje në $1, duke fshirë',
+'simpleantispam-label' => "Kontroll anti-spam.
+'''MOS''' e plotësoni këtë!",
 
 # Info page
 'pageinfo-title' => 'Informacion për " $1 "',
index 6b190a5..b28c453 100644 (file)
@@ -3306,6 +3306,7 @@ $1',
 'spam_reverting' => 'Враћам на последњу измену која не садржи везе до $1',
 'spam_blanking' => 'Све измене садрже везе до $1. Чистим',
 'spam_deleting' => 'Све измене садрже везе до $1. Бришем',
+'simpleantispam-label' => "Провера спама. '''НЕ''' попуњавај ово унутра!",
 
 # Info page
 'pageinfo-title' => 'Подаци о „$1“',
index ddb5668..bb7f381 100644 (file)
@@ -3158,6 +3158,7 @@ Ovo je verovatno izazvano vezom do spoljašnjeg sajta koji se nalazi na crnoj li
 'spam_reverting' => 'Vraćam na poslednju izmenu koja ne sadrži veze do $1',
 'spam_blanking' => 'Sve izmene sadrže veze do $1. Čistim',
 'spam_deleting' => 'Sve izmene sadrže veze do $1. Brišem',
+'simpleantispam-label' => "Provera spama. '''NE''' popunjavaj ovo unutra!",
 
 # Info page
 'pageinfo-title' => 'Podaci o „$1“',
index 89997c0..a5fb117 100644 (file)
@@ -2547,6 +2547,7 @@ Do ap dän lokoale Reekener spiekerje un deerätter hier hoochleede.',
 'spambot_username' => 'MediaWiki Spam-Süüwerenge',
 'spam_reverting' => 'Lääste Version sunner Links tou $1 wier häärstoald.',
 'spam_blanking' => 'Aal Versione äntheelden Links tou $1, skeenmoaked.',
+'simpleantispam-label' => "Spamskuts-Wröige. Hier '''niks''' iendreege!",
 
 # Info page
 'pageinfo-title' => 'Informatione tou „$1“',
index 30dd4d0..656f5bf 100644 (file)
@@ -3211,6 +3211,8 @@ Detta orsakades troligen av en länk till en svartlistad webbplats.',
 'spam_reverting' => 'Återställer till den senaste versionen som inte innehåller länkar till $1',
 'spam_blanking' => 'Alla versioner innehöll en länk till $1, blankar',
 'spam_deleting' => 'Alla ändringar innehöll länkar till $1, raderar',
+'simpleantispam-label' => "Anti-spam koll.
+Fyll '''INTE''' i det här!",
 
 # Info page
 'pageinfo-title' => 'Information om "$1"',
index 30a9c33..7c7b5e1 100644 (file)
@@ -2488,6 +2488,8 @@ Mazmun üçin bir sebäp goşmaga rugsat berýär',
 'spambot_username' => 'MediaWiki spam arassalaýyş',
 'spam_reverting' => '$1 sahypasyna çykgytlary bolmadyk iň soňky wersiýasyna yzyna getirilýär',
 'spam_blanking' => 'Ähli wersiýalarda $1 sahypasyna çykgytlar bar, boşadylýar',
+'simpleantispam-label' => "Anti-spam barlagy.
+Muny '''DOLDURMAŇ'''!",
 
 # Patrolling
 'markaspatrolleddiff' => 'Patrullyk edilen diýip belle',
index 4142d51..becffb7 100644 (file)
@@ -2953,6 +2953,8 @@ Maaaring dahil ito sa isang kawing sa isang nakatalang hinarang dahil di-kinaisn
 'spam_reverting' => "Ibinabalik sa huling bersyon na 'di-naglalaman ng mga kawing sa $1",
 'spam_blanking' => 'Lahat ng mga pagbabago ay naglalaman ng mga kawing sa $1, pagpapatlang',
 'spam_deleting' => 'Lahat ng mga pagbabago ay naglalaman ng mga kawing sa $1, binubura',
+'simpleantispam-label' => "Pagsusuring panlaban sa \"manlulusob\" (''spam'').
+'''HUWAG''' itong lagyan ng laman!",
 
 # Info page
 'pageinfo-title' => 'Kabatiran para sa "$1"',
index a32169b..4112244 100644 (file)
@@ -2053,12 +2053,14 @@ Sıradaki liste sadece bu dosyaya bağlantı veren {{PLURAL:$1|ilk dosyayı|ilk
 'morelinkstoimage' => 'Bu dosyaya [[Special:WhatLinksHere/$1|daha fazla bağlantıları]] gör.',
 'linkstoimage-redirect' => '$1 (dosya yönlendirme) $2',
 'duplicatesoffile' => 'Şu {{PLURAL:$1|dosya|$1 dosya}}, bu dosyanın kopyası ([[Special:FileDuplicateSearch/$2|daha fazla ayrıntı]]):',
-'sharedupload' => 'Bu dosya $1 deposundan ve diğer projelerde kullanılıyor olabilir.',
+'sharedupload' => 'Bu dosya $1 projesinden olup, diğer projelerde kullanılıyor olabilir.',
 'sharedupload-desc-there' => 'Bu dosya $1 deposundan ve diğer projeler tarafından kullanılıyor olabilir. Daha fazla bilgi için lütfen [$2 dosya açıklama sayfasına] bakın.',
 'sharedupload-desc-here' => 'Bu dosya $1 deposundan ve diğer projeler tarafından kullanılıyor olabilir.
 Aşağıda [$2 dosya açıklama sayfasındaki] açıklama gösteriliyor.',
-'sharedupload-desc-create' => 'Bu dosya, $1 ve diğer projeler tarafından kullanılıyor olabilir. 
-Dosya açıklamasını düzenlemek isterseniz, [$2 dosya açıklama sayfası] bulunmaktadır.',
+'sharedupload-desc-edit' => 'Bu dosya $1 projesinden olup, diğer projelerde kullanılıyor olabilir.
+Dosyanın açıklama sayfasında değişiklik yapmak için ilgili sayfaya [$2 buradan] gidebilirsiniz.',
+'sharedupload-desc-create' => 'Bu dosya $1 projesinden olup, diğer projelerde kullanılıyor olabilir.
+Dosyanın açıklama sayfasında değişiklik yapmak için ilgili sayfaya [$2 buradan] gidebilirsiniz.',
 'filepage-nofile' => 'Bu isimde bir dosya yok.',
 'filepage-nofile-link' => 'Bu isimde bir dosya yok, ama siz [$1 yükleyebilirsiniz].',
 'uploadnewversion-linktext' => 'Dosyanın yenisini yükleyin',
@@ -3116,6 +3118,8 @@ Geçici dosya kayıp.',
 'spambot_username' => 'Medyaviki spam temizleme',
 'spam_reverting' => '$1 ile bağlantı içermeyen son sürüme geri dönülüyor',
 'spam_blanking' => 'Tüm revizyonlar $1 sayfasına bağlantı içeriyor, boşaltılıyor',
+'simpleantispam-label' => "Anti-spam denetimi.
+Bunu '''doldurmayın'''!",
 
 # Info page
 'pageinfo-title' => 'Bilgi için "$1"',
index 7c16f4a..ac03870 100644 (file)
@@ -151,7 +151,7 @@ $messages = array(
 'index-category' => 'Индексировать кароно бамъёс',
 'noindex-category' => 'Индексировать каронтэм бамъёс',
 
-'linkprefix' => '/^(.*?)(„|«)$/sDu',
+'linkprefix' => '/^((?>.*(?<!(?:„|«)$)))(.+)$/sDu',
 
 'about' => 'Та сярысь',
 'article' => 'Статья',
index d75a570..105bef1 100644 (file)
@@ -3278,6 +3278,8 @@ The wiki server can't provide data in a format your client can read.",
 'spam_reverting' => 'Відкинути до останньої версії, що не містить посилання на $1',
 'spam_blanking' => 'Всі версії містять посилання на $1, очистка',
 'spam_deleting' => 'Все версії, що містили посилання на $1, вилучаються',
+'simpleantispam-label' => "Перевірка на спам.
+'''НЕ''' заповнюйте це!",
 
 # Info page
 'pageinfo-title' => 'Інформація про " $1 "',
index cd96f55..535d622 100644 (file)
@@ -2902,6 +2902,8 @@ Questo xe probabilmente dovùo a la presenza de un colegamento a un sito foresto
 'spam_reverting' => "Ripristinà l'ultima version priva de colegamenti a $1",
 'spam_blanking' => 'Pàxena svodà, tute łe version le contegneva cołegamenti a $1',
 'spam_deleting' => 'Pàjina scansełà, tute łe version łe contegneva ligamenti a $1',
+'simpleantispam-label' => "Controlo anti spam.
+'''NO STA''' scrivar gnente qua de soto!",
 
 # Info page
 'pageinfo-title' => 'Informasion par "$1"',
index c5803ed..c9f486c 100644 (file)
@@ -3191,6 +3191,8 @@ Lưu nó vào máy tính của bạn rồi tải nó lên đây.',
 'spam_reverting' => 'Lùi lại đến phiên bản cuối không chứa liên kết đến $1',
 'spam_blanking' => 'Tất cả các phiên bản có liên kết đến $1; tẩy trống',
 'spam_deleting' => 'Tất cả các phiên bản có liên kết đến $1; xóa',
+'simpleantispam-label' => "Kiểm tra chống spam.
+Xin '''ĐỪNG''' điền gì vào!",
 
 # Info page
 'pageinfo-title' => 'Thông tin về “$1”',
index f0a9494..d048e58 100644 (file)
@@ -2645,6 +2645,8 @@ $1',
 'spambot_username' => 'MediaWiki垃圾清除',
 'spam_reverting' => '恢復返去最後一個唔包含指去$1嘅連結嘅嗰個修訂。',
 'spam_blanking' => '全部版本都含有指去$1嘅連結,留空',
+'simpleantispam-label' => "反垃圾檢查。
+'''唔好'''加入呢個!",
 
 # Skin names
 'skinname-cologneblue' => '科隆藍',
index 9d66ede..580b7bd 100644 (file)
@@ -578,7 +578,7 @@ $messages = array(
 'articlepage' => '查看内容页面',
 'talk' => '讨论',
 'views' => '查看',
-'toolbox' => '工具',
+'toolbox' => '工具',
 'userpage' => '查看用户页面',
 'projectpage' => '查看项目页面',
 'imagepage' => '查看文件页面',
@@ -3111,6 +3111,8 @@ $2',
 'spam_reverting' => '恢复到不包含链接的最近修订版本$1',
 'spam_blanking' => '消隐所有包含链接至$1的修订',
 'spam_deleting' => '正在删除所有包含至$1的版本',
+'simpleantispam-label' => "反垃圾检查。
+'''不要'''加入这个!",
 
 # Info page
 'pageinfo-title' => '“$1”的信息',
index 992db6b..28ab8f6 100644 (file)
@@ -3084,6 +3084,8 @@ $2',
 'spam_reverting' => '恢復到不包含連結至$1的最近修訂版本',
 'spam_blanking' => '所有包含連結至$1的修訂,清空',
 'spam_deleting' => '所有包含連結至$1的修訂,刪除中',
+'simpleantispam-label' => "反垃圾檢查。
+'''不要'''加入這個!",
 
 # Info page
 'pageinfo-title' => '「$1」的信息',
index a94b6d5..a4fc922 100644 (file)
@@ -2776,6 +2776,7 @@ $wgMessageStructure = array(
                'spam_reverting',
                'spam_blanking',
                'spam_deleting',
+               'simpleantispam-label',
        ),
        'info' => array(
                'pageinfo-header',
index c033647..2c02de8 100644 (file)
@@ -655,7 +655,10 @@ return array(
        ),
        'mediawiki.inspect' => array(
                'scripts' => 'resources/mediawiki/mediawiki.inspect.js',
-               'dependencies' => 'jquery.byteLength',
+               'dependencies' => array(
+                       'jquery.byteLength',
+                       'jquery.json',
+               ),
                'targets' => array( 'desktop', 'mobile' ),
        ),
        'mediawiki.feedback' => array(
index 8268f12..346e783 100644 (file)
                 */
                auditSelectors: function ( css ) {
                        var selectors = { total: 0, matched: 0 },
-                               style = document.createElement( 'style' );
+                               style = document.createElement( 'style' ),
+                               sheet, rules;
 
                        style.textContent = css;
                        document.body.appendChild( style );
-                       $.each( style.sheet.cssRules, function ( index, rule ) {
+                       // Standards-compliant browsers use .sheet.cssRules, IE8 uses .styleSheet.rules…
+                       sheet = style.sheet || style.styleSheet;
+                       rules = sheet.cssRules || sheet.rules;
+                       $.each( rules, function ( index, rule ) {
                                selectors.total++;
                                if ( document.querySelector( rule.selectorText ) !== null ) {
                                        selectors.matched++;
                        try {
                                // Bartosz made me put this here.
                                if ( window.opera ) { throw window.opera; }
-                               console.table( data );
+                               // Use Function.prototype#call to force an exception on Firefox,
+                               // which doesn't define console#table but doesn't complain if you
+                               // try to invoke it.
+                               console.table.call( console.table, data );
                                return;
                        } catch (e) {}
                        try {
-                               console.log( JSON.stringify( data, null, 2 ) );
+                               console.log( $.toJSON( data, null, 2 ) );
                                return;
                        } catch (e) {}
                        mw.log( data );
index cd9a93e..dec8e22 100644 (file)
@@ -55,10 +55,10 @@ $wgAutoloadClasses += array(
        # tests/phpunit/includes/api
        'ApiFormatTestBase' => "$testDir/phpunit/includes/api/format/ApiFormatTestBase.php",
        'ApiTestCase' => "$testDir/phpunit/includes/api/ApiTestCase.php",
-       'ApiTestContext' => "$testDir/phpunit/includes/api/ApiTestCase.php",
-       'MockApi' => "$testDir/phpunit/includes/api/ApiTestCase.php",
+       'ApiTestContext' => "$testDir/phpunit/includes/api/ApiTestContext.php",
+       'MockApi' => "$testDir/phpunit/includes/api/MockApi.php",
+       'UserWrapper' => "$testDir/phpunit/includes/api/UserWrapper.php",
        'RandomImageGenerator' => "$testDir/phpunit/includes/api/RandomImageGenerator.php",
-       'UserWrapper' => "$testDir/phpunit/includes/api/ApiTestCase.php",
 
        # tests/phpunit/includes/content
        'DummyContentHandlerForTesting' => "$testDir/phpunit/includes/content/ContentHandlerTest.php",
@@ -78,6 +78,9 @@ $wgAutoloadClasses += array(
        # tests/phpunit/includes/libs
        'GenericArrayObjectTest' => "$testDir/phpunit/includes/libs/GenericArrayObjectTest.php",
 
+       # tests/phpunit/media
+       'FakeDimensionFile' => "$testDir/phpunit/includes/media/FakeDimensionFile.php",
+
        # tests/phpunit/includes/site
        'SiteTest' => "$testDir/phpunit/includes/site/SiteTest.php",
        'TestSites' => "$testDir/phpunit/includes/site/TestSites.php",
index 5036a51..58ea1ed 100644 (file)
@@ -494,6 +494,9 @@ class ParserTest {
 
        /**
         * Get a Parser object
+        *
+        * @param string $preprocessor
+        * @return Parser
         */
        function getParser( $preprocessor = null ) {
                global $wgParserConf;
@@ -566,6 +569,7 @@ class ParserTest {
                        $out = $parser->getPreloadText( $input, $title, $options );
                } else {
                        $output = $parser->parse( $input, $title, $options, true, true, 1337 );
+                       $output->setTOCEnabled( !isset( $opts['notoc'] ) );
                        $out = $output->getText();
 
                        if ( isset( $opts['showtitle'] ) ) {
@@ -618,7 +622,7 @@ class ParserTest {
        /**
         * Use a regex to find out the value of an option
         * @param $key String: name of option val to retrieve
-        * @param $opts Options array to look in
+        * @param $opts array: Options array to look in
         * @param $default Mixed: default value returned if not found
         */
        private static function getOptionValue( $key, $opts, $default ) {
index 3882185..02a66b5 100644 (file)
@@ -26,6 +26,7 @@
 # showtitle     make the first line the title
 # comment       run through Linker::formatComment() instead of main parser
 # local         format section links in edit comment text as local links
+# notoc         disable table of contents
 #
 # You can also set the following parser properties via test options:
 #  wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
@@ -10520,6 +10521,7 @@ Some text
 </li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h3><span class="mw-headline" id="Subheadline_1">Subheadline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Subheadline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
 <h5><span class="mw-headline" id="Skipping_a_level">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
@@ -10575,6 +10577,7 @@ Handling of sections up to level 6 and beyond
 </li>
 </ul>
 </div>
+
 <h1><span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Level 1 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
 <h2><span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Level 2 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h3><span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Level 3 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
@@ -10617,6 +10620,7 @@ TOC regression (bug 9764)
 </li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
@@ -10653,6 +10657,7 @@ wgMaxTocLevel=3
 </li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
@@ -10683,6 +10688,7 @@ wgMaxTocLevel=3
 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h3><span class="mw-headline" id="Section_1.1">Section 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Section 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
 <h4><span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Section 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
@@ -10775,6 +10781,7 @@ __TOC__
 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
@@ -10838,6 +10845,7 @@ section 5
 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="text_.3E_text">text &gt; text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: text > text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <p>section 1
 </p>
@@ -10872,6 +10880,7 @@ Headers with excess '=' characters
 <li class="toclevel-1 tocsection-4"><a href="#.3Ditalic_heading"><span class="tocnumber">4</span> <span class="toctext">=<i>italic</i> heading</span></a></li>
 </ul>
 </div>
+
 <h1><span class="mw-headline" id="foo.3D">foo=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: foo=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
 <h1><span class="mw-headline" id=".3Dfoo">=foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: =foo">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
 <h1><span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: italic heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
@@ -10909,6 +10918,7 @@ __NOEDITSECTION__
 </li>
 </ul>
 </div>
+
 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
@@ -12297,6 +12307,7 @@ http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 </ul>
 </div>
 
+
 !! end
 
 !! test
@@ -14226,6 +14237,7 @@ Out-of-order TOC heading levels
 </li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h6><span class="mw-headline" id="6">6</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: 6">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
 <h3><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
@@ -15824,6 +15836,7 @@ __TOC__
 <li class="toclevel-1 tocsection-1"><a href="#Lost_episodes"><span class="tocnumber">1</span> <span class="toctext"><i>Lost</i> episodes</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="Lost_episodes"><i>Lost</i> episodes</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Lost episodes">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
 !! end
@@ -15841,6 +15854,7 @@ __TOC__
 <li class="toclevel-1 tocsection-1"><a href="#should_be_bold_then_normal_text"><span class="tocnumber">1</span> <span class="toctext"><b>should be bold</b> then normal text</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="should_be_bold_then_normal_text"><b>should be bold</b> then normal text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: should be bold then normal text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
 !! end
@@ -15858,6 +15872,7 @@ __TOC__
 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
 !! end
@@ -15875,6 +15890,7 @@ __TOC__
 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
 !! end
@@ -15894,6 +15910,7 @@ QED
 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_.3C_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 &lt; 3</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="Proof:_2_.3C_3">Proof: 2 &lt; 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Proof: 2 &lt; 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <p><small>Hanc marginis exiguitas non caperet.</small>
 QED
@@ -15914,6 +15931,7 @@ __TOC__
 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
@@ -15933,6 +15951,7 @@ __TOC__
 <li class="toclevel-1 tocsection-2"><a href="#b.22.3EEvilbye"><span class="tocnumber">2</span> <span class="toctext"><sup> b"&gt;Evilbye</sup></span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="Hello"><sup class="in-h2">Hello</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Hello">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> b"&gt;Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: b&quot;>Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 
@@ -15961,6 +15980,7 @@ __TOC__
 <li class="toclevel-1 tocsection-5"><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">5</span> <span class="toctext"><span dir="ltr">Attributes after dir on these span tags must be deleted from the TOC</span></span></a></li>
 </ul>
 </div>
+
 <h2><span class="mw-headline" id="C.2B.2B"><span dir="ltr">C++</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: C++">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h2><span class="mw-headline" id=".D7.96.D7.91.D7.A0.D7.92.21"><span dir="rtl">זבנג!</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: זבנג!">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
 <h2><span class="mw-headline" id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: The attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
@@ -16250,6 +16270,29 @@ HttP://MediaWiki.Org/
 </p>
 !! end
 
+!!test
+Disable TOC
+!! options
+notoc
+!! input
+Lead
+== Section 1 ==
+== Section 2 ==
+== Section 3 ==
+== Section 4 ==
+== Section 5 ==
+!! result
+<p>Lead
+</p>
+
+<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_5">Section 5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: Section 5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
 
 ###
 ### Parsoids-specific tests
index 686ab93..c749598 100644 (file)
@@ -5,7 +5,11 @@
  */
 class ArticleTablesTest extends MediaWikiLangTestCase {
 
-       function testbug14404() {
+       /**
+        * @covers Title::getTemplateLinksFrom
+        * @covers Title::getLinksFrom
+        */
+       public function testbug14404() {
                global $wgContLang, $wgLanguageCode, $wgLang;
 
                $title = Title::newFromText( 'Bug 14404' );
index 867c4f0..84f900f 100644 (file)
@@ -25,28 +25,37 @@ class ArticleTest extends MediaWikiTestCase {
                $this->article = null;
        }
 
-       function testImplementsGetMagic() {
+       /**
+        * @covers Article::__get
+        */
+       public function testImplementsGetMagic() {
                $this->assertEquals( false, $this->article->mLatest, "Article __get magic" );
        }
 
        /**
         * @depends testImplementsGetMagic
+        * @covers Article::__set
         */
-       function testImplementsSetMagic() {
+       public function testImplementsSetMagic() {
                $this->article->mLatest = 2;
                $this->assertEquals( 2, $this->article->mLatest, "Article __set magic" );
        }
 
        /**
         * @depends testImplementsSetMagic
+        * @covers Article::__call
         */
-       function testImplementsCallMagic() {
+       public function testImplementsCallMagic() {
                $this->article->mLatest = 33;
                $this->article->mDataLoaded = true;
                $this->assertEquals( 33, $this->article->getLatest(), "Article __call magic" );
        }
 
-       function testGetOrSetOnNewProperty() {
+       /**
+        * @covers Article::__get
+        * @covers Article::__set
+        */
+       public function testGetOrSetOnNewProperty() {
                $this->article->ext_someNewProperty = 12;
                $this->assertEquals( 12, $this->article->ext_someNewProperty,
                        "Article get/set magic on new field" );
@@ -58,8 +67,13 @@ class ArticleTest extends MediaWikiTestCase {
 
        /**
         * Checks for the existence of the backwards compatibility static functions (forwarders to WikiPage class)
+        * @covers Article::selectFields
+        * @covers Article::onArticleCreate
+        * @covers Article::onArticleDelete
+        * @covers Article::onArticleEdit
+        * @covers Article::getAutosummary
         */
-       function testStaticFunctions() {
+       public function testStaticFunctions() {
                $this->hideDeprecated( 'Article::getAutosummary' );
                $this->hideDeprecated( 'WikiPage::getAutosummary' );
                $this->hideDeprecated( 'CategoryPage::getAutosummary' ); // Inherited from Article
@@ -75,18 +89,4 @@ class ArticleTest extends MediaWikiTestCase {
                $this->assertTrue( is_string( CategoryPage::getAutosummary( '', '', 0 ) ),
                        "Article static functions" );
        }
-
-       function testWikiPageFactory() {
-               $title = Title::makeTitle( NS_FILE, 'Someimage.png' );
-               $page = WikiPage::factory( $title );
-               $this->assertEquals( 'WikiFilePage', get_class( $page ) );
-
-               $title = Title::makeTitle( NS_CATEGORY, 'SomeCategory' );
-               $page = WikiPage::factory( $title );
-               $this->assertEquals( 'WikiCategoryPage', get_class( $page ) );
-
-               $title = Title::makeTitle( NS_MAIN, 'SomePage' );
-               $page = WikiPage::factory( $title );
-               $this->assertEquals( 'WikiPage', get_class( $page ) );
-       }
 }
index 32fc2c5..f0049fe 100644 (file)
@@ -6,7 +6,9 @@
  */
 class BlockTest extends MediaWikiLangTestCase {
 
-       private $block, $madeAt;
+       /** @var Block */
+       private $block;
+       private $madeAt;
 
        /* variable used to save up the blockID we insert in this test suite */
        private $blockId;
@@ -66,18 +68,24 @@ class BlockTest extends MediaWikiLangTestCase {
                }
        }
 
-       function testInitializerFunctionsReturnCorrectBlock() {
-               // $this->dumpBlocks();
-
+       /**
+        * @covers Block::newFromTarget
+        */
+       public function testINewFromTargetReturnsCorrectBlock() {
                $this->assertTrue( $this->block->equals( Block::newFromTarget( 'UTBlockee' ) ), "newFromTarget() returns the same block as the one that was made" );
+       }
 
+       /**
+        * @covers Block::newFromID
+        */
+       public function testINewFromIDReturnsCorrectBlock() {
                $this->assertTrue( $this->block->equals( Block::newFromID( $this->blockId ) ), "newFromID() returns the same block as the one that was made" );
        }
 
        /**
         * per bug 26425
         */
-       function testBug26425BlockTimestampDefaultsToTime() {
+       public function testBug26425BlockTimestampDefaultsToTime() {
                // delta to stop one-off errors when things happen to go over a second mark.
                $delta = abs( $this->madeAt - $this->block->mTimestamp );
                $this->assertLessThan( 2, $delta, "If no timestamp is specified, the block is recorded as time()" );
@@ -90,8 +98,9 @@ class BlockTest extends MediaWikiLangTestCase {
         * This stopped working with r84475 and friends: regression being fixed for bug 29116.
         *
         * @dataProvider provideBug29116Data
+        * @covers Block::load
         */
-       function testBug29116LoadWithEmptyIp( $vagueTarget ) {
+       public function testBug29116LoadWithEmptyIp( $vagueTarget ) {
                $this->hideDeprecated( 'Block::load' );
 
                $uid = User::idFromName( 'UTBlockee' );
@@ -110,8 +119,9 @@ class BlockTest extends MediaWikiLangTestCase {
         * had. Regression bug 29116.
         *
         * @dataProvider provideBug29116Data
+        * @covers Block::newFromTarget
         */
-       function testBug29116NewFromTargetWithEmptyIp( $vagueTarget ) {
+       public function testBug29116NewFromTargetWithEmptyIp( $vagueTarget ) {
                $block = Block::newFromTarget( 'UTBlockee', $vagueTarget );
                $this->assertTrue( $this->block->equals( $block ), "newFromTarget() returns the same block as the one that was made when given empty vagueTarget param " . var_export( $vagueTarget, true ) );
        }
@@ -124,7 +134,10 @@ class BlockTest extends MediaWikiLangTestCase {
                );
        }
 
-       function testBlockedUserCanNotCreateAccount() {
+       /**
+        * @covers Block::prevents
+        */
+       public function testBlockedUserCanNotCreateAccount() {
                $username = 'BlockedUserToCreateAccountWith';
                $u = User::newFromName( $username );
                $u->setPassword( 'NotRandomPass' );
@@ -184,7 +197,10 @@ class BlockTest extends MediaWikiLangTestCase {
                );
        }
 
-       function testCrappyCrossWikiBlocks() {
+       /**
+        * @covers Block::insert
+        */
+       public function testCrappyCrossWikiBlocks() {
                // Delete the last round's block if it's still there
                $oldBlock = Block::newFromTarget( 'UserOnForeignWiki' );
                if ( $oldBlock ) {
@@ -343,8 +359,10 @@ class BlockTest extends MediaWikiLangTestCase {
 
        /**
         * @dataProvider providerXff
+        * @covers Block::getBlocksForIPList
+        * @covers Block::chooseBlock
         */
-       function testBlocksOnXff( $xff, $exCount, $exResult ) {
+       public function testBlocksOnXff( $xff, $exCount, $exResult ) {
                $list = array_map( 'trim', explode( ',', $xff ) );
                $xffblocks = Block::getBlocksForIPList( $list, true );
                $this->assertEquals( $exCount, count( $xffblocks ), 'Number of blocks for ' . $xff );
index e3d9da7..4832ada 100644 (file)
@@ -2,6 +2,8 @@
 
 /**
  * Test the CDB reader/writer
+ * @covers CdbWriter_PHP
+ * @covers CdbWriter_DBA
  */
 class CdbTest extends MediaWikiTestCase {
 
index f1004fb..c6a7169 100644 (file)
@@ -1,4 +1,12 @@
 <?php
+
+/**
+ * Class CollationTest
+ * @covers Collation
+ * @covers IcuCollation
+ * @covers IdentityCollation
+ * @covers UppercaseCollation
+ */
 class CollationTest extends MediaWikiLangTestCase {
        protected function setUp() {
                parent::setUp();
@@ -20,7 +28,7 @@ class CollationTest extends MediaWikiLangTestCase {
         *
         * @dataProvider prefixDataProvider
         */
-       function testIsPrefix( $lang, $base, $extended ) {
+       public function testIsPrefix( $lang, $base, $extended ) {
                $cp = Collator::create( $lang );
                $cp->setStrength( Collator::PRIMARY );
                $baseBin = $cp->getSortKey( $base );
@@ -30,7 +38,7 @@ class CollationTest extends MediaWikiLangTestCase {
                $this->assertStringStartsWith( $baseBin, $extendedBin, "$base is not a prefix of $extended" );
        }
 
-       function prefixDataProvider() {
+       public static function prefixDataProvider() {
                return array(
                        array( 'en', 'A', 'AA' ),
                        array( 'en', 'A', 'AAA' ),
@@ -53,7 +61,7 @@ class CollationTest extends MediaWikiLangTestCase {
         *
         * @dataProvider notPrefixDataProvider
         */
-       function testNotIsPrefix( $lang, $base, $extended ) {
+       public function testNotIsPrefix( $lang, $base, $extended ) {
                $cp = Collator::create( $lang );
                $cp->setStrength( Collator::PRIMARY );
                $baseBin = $cp->getSortKey( $base );
@@ -63,7 +71,7 @@ class CollationTest extends MediaWikiLangTestCase {
                $this->assertStringStartsNotWith( $baseBin, $extendedBin, "$base is a prefix of $extended" );
        }
 
-       function notPrefixDataProvider() {
+       public static function notPrefixDataProvider() {
                return array(
                        array( 'en', 'A', 'B' ),
                        array( 'en', 'AC', 'ABC' ),
@@ -81,7 +89,7 @@ class CollationTest extends MediaWikiLangTestCase {
         *
         * @dataProvider firstLetterProvider
         */
-       function testGetFirstLetter( $collation, $string, $firstLetter ) {
+       public function testGetFirstLetter( $collation, $string, $firstLetter ) {
                $col = Collation::factory( $collation );
                $this->assertEquals( $firstLetter, $col->getFirstLetter( $string ) );
        }
index d927b7a..76a9a10 100644 (file)
@@ -23,8 +23,9 @@ class DiffHistoryBlobTest extends MediaWikiTestCase {
        /**
         * Test for DiffHistoryBlob::xdiffAdler32()
         * @dataProvider provideXdiffAdler32
+        * @covers DiffHistoryBlob::xdiffAdler32
         */
-       function testXdiffAdler32( $input ) {
+       public function testXdiffAdler32( $input ) {
                $xdiffHash = substr( xdiff_string_rabdiff( $input, '' ), 0, 4 );
                $dhb = new DiffHistoryBlob;
                $myHash = $dhb->xdiffAdler32( $input );
index 76ef782..7d2b04f 100644 (file)
@@ -13,8 +13,9 @@ class EditPageTest extends MediaWikiLangTestCase {
 
        /**
         * @dataProvider provideExtractSectionTitle
+        * @covers EditPage::extractSectionTitle
         */
-       function testExtractSectionTitle( $section, $title ) {
+       public function testExtractSectionTitle( $section, $title ) {
                $extracted = EditPage::extractSectionTitle( $section );
                $this->assertEquals( $title, $extracted );
        }
@@ -59,7 +60,7 @@ class EditPageTest extends MediaWikiLangTestCase {
         * wrapper around assertEquals() which calls rrtrim() to normalize the
         * expected and actual texts.
         */
-       function assertEditedTextEquals( $expected, $actual, $msg = '' ) {
+       protected function assertEditedTextEquals( $expected, $actual, $msg = '' ) {
                return $this->assertEquals( rtrim( $expected ), rtrim( $actual ), $msg );
        }
 
@@ -172,6 +173,10 @@ class EditPageTest extends MediaWikiLangTestCase {
                return $page;
        }
 
+       /**
+        * @todo split into a dataprovider and test method
+        * @covers EditPage
+        */
        public function testCreatePage() {
                $this->assertEdit(
                        'EditPageTest_testCreatePage',
@@ -338,6 +343,7 @@ hello
 
        /**
         * @dataProvider provideSectionEdit
+        * @covers EditPage
         */
        public function testSectionEdit( $base, $section, $text, $summary, $expected ) {
                $edit = array(
@@ -432,6 +438,7 @@ hello
 
        /**
         * @dataProvider provideAutoMerge
+        * @covers EditPage
         */
        public function testAutoMerge( $baseUser, $text, $adamsEdit, $bertasEdit,
                $expectedCode, $expectedText, $message = null
index 99544e7..ba155a4 100644 (file)
@@ -5,7 +5,10 @@
 
 class ExternalStoreTest extends MediaWikiTestCase {
 
-       function testExternalFetchFromURL() {
+       /**
+        * @covers ExternalStore::fetchFromURL
+        */
+       public function testExternalFetchFromURL() {
                $this->setMwGlobals( 'wgExternalStores', false );
 
                $this->assertFalse(
index 07215c1..dc19154 100644 (file)
@@ -5,6 +5,11 @@
  */
 class ExtraParserTest extends MediaWikiTestCase {
 
+       /** @var ParserOptions */
+       protected $options;
+       /** @var Parser */
+       protected $parser;
+
        protected function setUp() {
                parent::setUp();
 
@@ -26,8 +31,11 @@ class ExtraParserTest extends MediaWikiTestCase {
                MagicWord::clearCache();
        }
 
-       // Bug 8689 - Long numeric lines kill the parser
-       function testBug8689() {
+       /**
+        * Bug 8689 - Long numeric lines kill the parser
+        * @covers Parser::parse
+        */
+       public function testBug8689() {
                global $wgUser;
                $longLine = '1.' . str_repeat( '1234567890', 100000 ) . "\n";
 
@@ -37,14 +45,20 @@ class ExtraParserTest extends MediaWikiTestCase {
                        $this->parser->parse( $longLine, $t, $options )->getText() );
        }
 
-       /* Test the parser entry points */
-       function testParse() {
+       /**
+        * Test the parser entry points
+        * @covers Parser::parse
+        */
+       public function testParse() {
                $title = Title::newFromText( __FUNCTION__ );
                $parserOutput = $this->parser->parse( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
                $this->assertEquals( "<p>Test\nContent of <i>Template:Foo</i>\nContent of <i>Template:Bar</i>\n</p>", $parserOutput->getText() );
        }
 
-       function testPreSaveTransform() {
+       /**
+        * @covers Parser::preSaveTransform
+        */
+       public function testPreSaveTransform() {
                global $wgUser;
                $title = Title::newFromText( __FUNCTION__ );
                $outputText = $this->parser->preSaveTransform( "Test\r\n{{subst:Foo}}\n{{Bar}}", $title, $wgUser, $this->options );
@@ -52,7 +66,10 @@ class ExtraParserTest extends MediaWikiTestCase {
                $this->assertEquals( "Test\nContent of ''Template:Foo''\n{{Bar}}", $outputText );
        }
 
-       function testPreprocess() {
+       /**
+        * @covers Parser::preprocess
+        */
+       public function testPreprocess() {
                $title = Title::newFromText( __FUNCTION__ );
                $outputText = $this->parser->preprocess( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
 
@@ -61,8 +78,9 @@ class ExtraParserTest extends MediaWikiTestCase {
 
        /**
         * cleanSig() makes all templates substs and removes tildes
+        * @covers Parser::cleanSig
         */
-       function testCleanSig() {
+       public function testCleanSig() {
                $title = Title::newFromText( __FUNCTION__ );
                $outputText = $this->parser->cleanSig( "{{Foo}} ~~~~" );
 
@@ -71,8 +89,9 @@ class ExtraParserTest extends MediaWikiTestCase {
 
        /**
         * cleanSig() should do nothing if disabled
+        * @covers Parser::cleanSig
         */
-       function testCleanSigDisabled() {
+       public function testCleanSigDisabled() {
                $this->setMwGlobals( 'wgCleanSignatures', false );
 
                $title = Title::newFromText( __FUNCTION__ );
@@ -84,8 +103,9 @@ class ExtraParserTest extends MediaWikiTestCase {
        /**
         * cleanSigInSig() just removes tildes
         * @dataProvider provideStringsForCleanSigInSig
+        * @covers Parser::cleanSigInSig
         */
-       function testCleanSigInSig( $in, $out ) {
+       public function testCleanSigInSig( $in, $out ) {
                $this->assertEquals( Parser::cleanSigInSig( $in ), $out );
        }
 
@@ -97,7 +117,10 @@ class ExtraParserTest extends MediaWikiTestCase {
                );
        }
 
-       function testGetSection() {
+       /**
+        * @covers Parser::getSection
+        */
+       public function testGetSection() {
                $outputText2 = $this->parser->getSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 2 );
                $outputText1 = $this->parser->getSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 1 );
 
@@ -105,7 +128,10 @@ class ExtraParserTest extends MediaWikiTestCase {
                $this->assertEquals( "== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2", $outputText1 );
        }
 
-       function testReplaceSection() {
+       /**
+        * @covers Parser::replaceSection
+        */
+       public function testReplaceSection() {
                $outputText = $this->parser->replaceSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 1, "New section 1" );
 
                $this->assertEquals( "Section 0\nNew section 1\n\n== Heading 3 ==\nSection 3", $outputText );
@@ -113,8 +139,9 @@ class ExtraParserTest extends MediaWikiTestCase {
 
        /**
         * Templates and comments are not affected, but noinclude/onlyinclude is.
+        * @covers Parser::getPreloadText
         */
-       function testGetPreloadText() {
+       public function testGetPreloadText() {
                $title = Title::newFromText( __FUNCTION__ );
                $outputText = $this->parser->getPreloadText( "{{Foo}}<noinclude> censored</noinclude> information <!-- is very secret -->", $title, $this->options );
 
@@ -133,8 +160,9 @@ class ExtraParserTest extends MediaWikiTestCase {
 
        /**
         * @group Database
+        * @covers Parser::parse
         */
-       function testTrackingCategory() {
+       public function testTrackingCategory() {
                $title = Title::newFromText( __FUNCTION__ );
                $catName = wfMessage( 'broken-file-category' )->inContentLanguage()->text();
                $cat = Title::makeTitleSafe( NS_CATEGORY, $catName );
@@ -146,8 +174,9 @@ class ExtraParserTest extends MediaWikiTestCase {
 
        /**
         * @group Database
+        * @covers Parser::parse
         */
-       function testTrackingCategorySpecial() {
+       public function testTrackingCategorySpecial() {
                // Special pages shouldn't have tracking cats.
                $title = SpecialPage::getTitleFor( 'Contributions' );
                $parserOutput = $this->parser->parse( "[[file:nonexistent]]", $title, $this->options );
diff --git a/tests/phpunit/includes/FallbackTest.php b/tests/phpunit/includes/FallbackTest.php
new file mode 100644 (file)
index 0000000..f408f47
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+
+/**
+ * @covers Fallback
+ */
+class FallbackTest extends MediaWikiTestCase {
+
+       public function testFallbackMbstringFunctions() {
+
+               if ( !extension_loaded( 'mbstring' ) ) {
+                       $this->markTestSkipped( "The mb_string functions must be installed to test the fallback functions" );
+               }
+
+               $sampleUTF = "Östergötland_coat_of_arms.png";
+
+               //mb_substr
+               $substr_params = array(
+                       array( 0, 0 ),
+                       array( 5, -4 ),
+                       array( 33 ),
+                       array( 100, -5 ),
+                       array( -8, 10 ),
+                       array( 1, 1 ),
+                       array( 2, -1 )
+               );
+
+               foreach ( $substr_params as $param_set ) {
+                       $old_param_set = $param_set;
+                       array_unshift( $param_set, $sampleUTF );
+
+                       $this->assertEquals(
+                               call_user_func_array( 'mb_substr', $param_set ),
+                               call_user_func_array( 'Fallback::mb_substr', $param_set ),
+                               'Fallback mb_substr with params ' . implode( ', ', $old_param_set )
+                       );
+               }
+
+               //mb_strlen
+               $this->assertEquals(
+                       mb_strlen( $sampleUTF ),
+                       Fallback::mb_strlen( $sampleUTF ),
+                       'Fallback mb_strlen'
+               );
+
+               //mb_str(r?)pos
+               $strpos_params = array(
+                       //array( 'ter' ),
+                       //array( 'Ö' ),
+                       //array( 'Ö', 3 ),
+                       //array( 'oat_', 100 ),
+                       //array( 'c', -10 ),
+                       //Broken for now
+               );
+
+               foreach ( $strpos_params as $param_set ) {
+                       $old_param_set = $param_set;
+                       array_unshift( $param_set, $sampleUTF );
+
+                       $this->assertEquals(
+                               call_user_func_array( 'mb_strpos', $param_set ),
+                               call_user_func_array( 'Fallback::mb_strpos', $param_set ),
+                               'Fallback mb_strpos with params ' . implode( ', ', $old_param_set )
+                       );
+
+                       $this->assertEquals(
+                               call_user_func_array( 'mb_strrpos', $param_set ),
+                               call_user_func_array( 'Fallback::mb_strrpos', $param_set ),
+                               'Fallback mb_strrpos with params ' . implode( ', ', $old_param_set )
+                       );
+               }
+       }
+
+}
\ No newline at end of file
index dfb0f13..3246410 100644 (file)
@@ -2,7 +2,11 @@
 
 class FauxRequestTest extends MediaWikiTestCase {
 
-       function testGetSetHeader() {
+       /**
+        * @covers FauxRequest::setHeader
+        * @covers FauxRequest::getHeader
+        */
+       public function testGetSetHeader() {
                $value = 'test/test';
 
                $request = new FauxRequest();
index 977c22b..7f41cfd 100644 (file)
  */
 
 class FauxResponseTest extends MediaWikiTestCase {
-       var $response;
+       /** @var FauxResponse */
+       protected $response;
 
        protected function setUp() {
                parent::setUp();
                $this->response = new FauxResponse;
        }
 
-       function testCookie() {
+       /**
+        * @covers FauxResponse::getcookie
+        * @covers FauxResponse::setcookie
+        */
+       public function testCookie() {
                $this->assertEquals( null, $this->response->getcookie( 'key' ), 'Non-existing cookie' );
                $this->response->setcookie( 'key', 'val' );
                $this->assertEquals( 'val', $this->response->getcookie( 'key' ), 'Existing cookie' );
        }
 
-       function testHeader() {
+       /**
+        * @covers FauxResponse::getheader
+        * @covers FauxResponse::header
+        */
+       public function testHeader() {
                $this->assertEquals( null, $this->response->getheader( 'Location' ), 'Non-existing header' );
 
                $this->response->header( 'Location: http://localhost/' );
@@ -52,7 +61,10 @@ class FauxResponseTest extends MediaWikiTestCase {
                $this->assertEquals( 'http://localhost/', $this->response->getheader( 'LOCATION' ), 'Get header case insensitive' );
        }
 
-       function testResponseCode() {
+       /**
+        * @covers FauxResponse::getStatusCode
+        */
+       public function testResponseCode() {
                $this->response->header( 'HTTP/1.1 200' );
                $this->assertEquals( 200, $this->response->getStatusCode(), 'Header with no message' );
 
index fb2304d..1531b56 100644 (file)
@@ -35,7 +35,6 @@ class FormOptionsInitializationTest extends MediaWikiTestCase {
         */
        protected $object;
 
-
        /**
         * A new fresh and empty FormOptions object to test initialization
         * with.
@@ -45,6 +44,9 @@ class FormOptionsInitializationTest extends MediaWikiTestCase {
                $this->object = new FormOptionsExposed();
        }
 
+       /**
+        * @covers FormOptionsExposed::add
+        */
        public function testAddStringOption() {
                $this->object->add( 'foo', 'string value' );
                $this->assertEquals(
@@ -60,6 +62,9 @@ class FormOptionsInitializationTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers FormOptionsExposed::add
+        */
        public function testAddIntegers() {
                $this->object->add( 'one', 1 );
                $this->object->add( 'negone', -1 );
index 0a13cfe..08d6ba8 100644 (file)
@@ -60,6 +60,7 @@ class FormOptionsTest extends MediaWikiTestCase {
 
        /**
         * Reuse helpers above assertGuessBoolean assertGuessInt assertGuessString
+        * @covers FormOptions::guessType
         */
        public function testGuessTypeDetection() {
                $this->assertGuessBoolean( true );
@@ -78,12 +79,14 @@ class FormOptionsTest extends MediaWikiTestCase {
 
        /**
         * @expectedException MWException
+        * @covers FormOptions::guessType
         */
        public function testGuessTypeOnArrayThrowException() {
                $this->object->guessType( array( 'foo' ) );
        }
        /**
         * @expectedException MWException
+        * @covers FormOptions::guessType
         */
        public function testGuessTypeOnNullThrowException() {
                $this->object->guessType( null );
index 244b100..6154df1 100644 (file)
@@ -29,7 +29,10 @@ class GlobalTest extends MediaWikiTestCase {
                parent::tearDown();
        }
 
-       /** @dataProvider provideForWfArrayDiff2 */
+       /**
+        * @dataProvider provideForWfArrayDiff2
+        * @covers ::wfArrayDiff2
+        */
        public function testWfArrayDiff2( $a, $b, $expected ) {
                $this->assertEquals(
                        wfArrayDiff2( $a, $b ), $expected
@@ -53,25 +56,37 @@ class GlobalTest extends MediaWikiTestCase {
                );
        }
 
-       function testRandom() {
+       /**
+        * @covers ::wfRandom
+        */
+       public function testRandom() {
                # This could hypothetically fail, but it shouldn't ;)
                $this->assertFalse(
                        wfRandom() == wfRandom() );
        }
 
-       function testUrlencode() {
+       /**
+        * @covers ::wfUrlencode
+        */
+       public function testUrlencode() {
                $this->assertEquals(
                        "%E7%89%B9%E5%88%A5:Contributions/Foobar",
                        wfUrlencode( "\xE7\x89\xB9\xE5\x88\xA5:Contributions/Foobar" ) );
        }
 
-       function testExpandIRI() {
+       /**
+        * @covers ::wfExpandIRI
+        */
+       public function testExpandIRI() {
                $this->assertEquals(
                        "https://te.wikibooks.org/wiki/ఉబుంటు_వాడుకరి_మార్గదర్శని",
                        wfExpandIRI( "https://te.wikibooks.org/wiki/%E0%B0%89%E0%B0%AC%E0%B1%81%E0%B0%82%E0%B0%9F%E0%B1%81_%E0%B0%B5%E0%B0%BE%E0%B0%A1%E0%B1%81%E0%B0%95%E0%B0%B0%E0%B0%BF_%E0%B0%AE%E0%B0%BE%E0%B0%B0%E0%B1%8D%E0%B0%97%E0%B0%A6%E0%B0%B0%E0%B1%8D%E0%B0%B6%E0%B0%A8%E0%B0%BF" ) );
        }
 
-       function testReadOnlyEmpty() {
+       /**
+        * @covers ::wfReadOnly
+        */
+       public function testReadOnlyEmpty() {
                global $wgReadOnly;
                $wgReadOnly = null;
 
@@ -79,7 +94,10 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertFalse( wfReadOnly() );
        }
 
-       function testReadOnlySet() {
+       /**
+        * @covers ::wfReadOnly
+        */
+       public function testReadOnlySet() {
                global $wgReadOnly, $wgReadOnlyFile;
 
                $f = fopen( $wgReadOnlyFile, "wt" );
@@ -97,12 +115,6 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertFalse( wfReadOnly() );
        }
 
-       function testQuotedPrintable() {
-               $this->assertEquals(
-                       "=?UTF-8?Q?=C4=88u=20legebla=3F?=",
-                       UserMailer::quotedPrintable( "\xc4\x88u legebla?", "UTF-8" ) );
-       }
-
        public static function provideArrayToCGI() {
                return array(
                        array( array(), '' ), // empty
@@ -123,13 +135,17 @@ class GlobalTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideArrayToCGI
+        * @covers ::wfArrayToCgi
         */
-       function testArrayToCGI( $array, $result ) {
+       public function testArrayToCGI( $array, $result ) {
                $this->assertEquals( $result, wfArrayToCgi( $array ) );
        }
 
 
-       function testArrayToCGI2() {
+       /**
+        * @covers ::testWfArrayDiff2
+        */
+       public function testArrayToCGI2() {
                $this->assertEquals(
                        "baz=bar&foo=bar",
                        wfArrayToCgi(
@@ -154,8 +170,9 @@ class GlobalTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideCgiToArray
+        * @covers ::wfCgiToArray
         */
-       function testCgiToArray( $cgi, $result ) {
+       public function testCgiToArray( $cgi, $result ) {
                $this->assertEquals( $result, wfCgiToArray( $cgi ) );
        }
 
@@ -174,12 +191,16 @@ class GlobalTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideCgiRoundTrip
+        * @covers ::wfArrayToCgi
         */
-       function testCgiRoundTrip( $cgi ) {
+       public function testCgiRoundTrip( $cgi ) {
                $this->assertEquals( $cgi, wfArrayToCgi( wfCgiToArray( $cgi ) ) );
        }
 
-       function testMimeTypeMatch() {
+       /**
+        * @covers ::mimeTypeMatch
+        */
+       public function testMimeTypeMatch() {
                $this->assertEquals(
                        'text/html',
                        mimeTypeMatch( 'text/html',
@@ -201,7 +222,10 @@ class GlobalTest extends MediaWikiTestCase {
                                        'image/svg+xml' => 0.5 ) ) );
        }
 
-       function testNegotiateType() {
+       /**
+        * @covers ::wfNegotiateType
+        */
+       public function testNegotiateType() {
                $this->assertEquals(
                        'text/html',
                        wfNegotiateType(
@@ -242,73 +266,11 @@ class GlobalTest extends MediaWikiTestCase {
                                array( 'application/xhtml+xml' => 1.0 ) ) );
        }
 
-       function testFallbackMbstringFunctions() {
-
-               if ( !extension_loaded( 'mbstring' ) ) {
-                       $this->markTestSkipped( "The mb_string functions must be installed to test the fallback functions" );
-               }
-
-               $sampleUTF = "Östergötland_coat_of_arms.png";
-
-               //mb_substr
-               $substr_params = array(
-                       array( 0, 0 ),
-                       array( 5, -4 ),
-                       array( 33 ),
-                       array( 100, -5 ),
-                       array( -8, 10 ),
-                       array( 1, 1 ),
-                       array( 2, -1 )
-               );
-
-               foreach ( $substr_params as $param_set ) {
-                       $old_param_set = $param_set;
-                       array_unshift( $param_set, $sampleUTF );
-
-                       $this->assertEquals(
-                               call_user_func_array( 'mb_substr', $param_set ),
-                               call_user_func_array( 'Fallback::mb_substr', $param_set ),
-                               'Fallback mb_substr with params ' . implode( ', ', $old_param_set )
-                       );
-               }
-
-               //mb_strlen
-               $this->assertEquals(
-                       mb_strlen( $sampleUTF ),
-                       Fallback::mb_strlen( $sampleUTF ),
-                       'Fallback mb_strlen'
-               );
-
-               //mb_str(r?)pos
-               $strpos_params = array(
-                       //array( 'ter' ),
-                       //array( 'Ö' ),
-                       //array( 'Ö', 3 ),
-                       //array( 'oat_', 100 ),
-                       //array( 'c', -10 ),
-                       //Broken for now
-               );
-
-               foreach ( $strpos_params as $param_set ) {
-                       $old_param_set = $param_set;
-                       array_unshift( $param_set, $sampleUTF );
-
-                       $this->assertEquals(
-                               call_user_func_array( 'mb_strpos', $param_set ),
-                               call_user_func_array( 'Fallback::mb_strpos', $param_set ),
-                               'Fallback mb_strpos with params ' . implode( ', ', $old_param_set )
-                       );
-
-                       $this->assertEquals(
-                               call_user_func_array( 'mb_strrpos', $param_set ),
-                               call_user_func_array( 'Fallback::mb_strrpos', $param_set ),
-                               'Fallback mb_strrpos with params ' . implode( ', ', $old_param_set )
-                       );
-               }
-       }
-
-
-       function testDebugFunctionTest() {
+       /**
+        * @covers ::wfDebug
+        * @covers ::wfDebugMem
+        */
+       public function testDebugFunctionTest() {
 
                global $wgDebugLogFile, $wgDebugTimestamps;
 
@@ -342,7 +304,10 @@ class GlobalTest extends MediaWikiTestCase {
                $wgDebugTimestamps = $old_wgDebugTimestamps;
        }
 
-       function testClientAcceptsGzipTest() {
+       /**
+        * @covers ::wfClientAcceptsGzip
+        */
+       public function testClientAcceptsGzipTest() {
 
                $settings = array(
                        'gzip' => true,
@@ -373,7 +338,10 @@ class GlobalTest extends MediaWikiTestCase {
                }
        }
 
-       function testSwapVarsTest() {
+       /**
+        * @covers ::swap
+        */
+       public function testSwapVarsTest() {
                $var1 = 1;
                $var2 = 2;
 
@@ -386,7 +354,10 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertEquals( $var2, 1, 'var2 is swapped' );
        }
 
-       function testWfPercentTest() {
+       /**
+        * @covers ::wfPercent
+        */
+       public function testWfPercentTest() {
 
                $pcts = array(
                        array( 6 / 7, '0.86%', 2, false ),
@@ -414,6 +385,7 @@ class GlobalTest extends MediaWikiTestCase {
        /**
         * test @see wfShorthandToInteger()
         * @dataProvider provideShorthand
+        * @covers ::wfShorthandToInteger
         */
        public function testWfShorthandToInteger( $shorthand, $expected ) {
                $this->assertEquals( $expected,
@@ -474,6 +446,7 @@ class GlobalTest extends MediaWikiTestCase {
         *
         * @dataProvider provideMerge()
         * @group medium
+        * @covers ::wfMerge
         */
        public function testMerge( $old, $mine, $yours, $expectedMergeResult, $expectedText ) {
                $this->checkHasDiff3();
@@ -549,8 +522,9 @@ class GlobalTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideMakeUrlIndexes()
+        * @covers ::wfMakeUrlIndexes
         */
-       function testMakeUrlIndexes( $url, $expected ) {
+       public function testMakeUrlIndexes( $url, $expected ) {
                $index = wfMakeUrlIndexes( $url );
                $this->assertEquals( $expected, $index, "wfMakeUrlIndexes(\"$url\")" );
        }
@@ -606,8 +580,9 @@ class GlobalTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideWfMatchesDomainList
+        * @covers ::wfMatchesDomainList
         */
-       function testWfMatchesDomainList( $url, $domains, $expected, $description ) {
+       public function testWfMatchesDomainList( $url, $domains, $expected, $description ) {
                $actual = wfMatchesDomainList( $url, $domains );
                $this->assertEquals( $expected, $actual, $description );
        }
@@ -630,7 +605,10 @@ class GlobalTest extends MediaWikiTestCase {
                return $a;
        }
 
-       function testWfMkdirParents() {
+       /**
+        * @covers ::wfMkdirParents
+        */
+       public function testWfMkdirParents() {
                // Should not return true if file exists instead of directory
                $fname = $this->getNewTempFile();
                wfSuppressWarnings();
@@ -641,8 +619,9 @@ class GlobalTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideWfShellMaintenanceCmdList
+        * @covers ::wfShellMaintenanceCmd
         */
-       function testWfShellMaintenanceCmd( $script, $parameters, $options, $expected, $description ) {
+       public function testWfShellMaintenanceCmd( $script, $parameters, $options, $expected, $description ) {
                if ( wfIsWindows() ) {
                        // Approximation that's good enough for our purposes just now
                        $expected = str_replace( "'", '"', $expected );
@@ -669,5 +648,5 @@ class GlobalTest extends MediaWikiTestCase {
                                "Called eval.php --help --test with wrapper and php option" ),
                );
        }
-       /* TODO: many more! */
+       /* @TODO many more! */
 }
index 8bd0849..cf891e7 100644 (file)
@@ -6,8 +6,9 @@
 class GlobalWithDBTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideWfIsBadImageList
+        * @covers ::wfIsBadImage
         */
-       function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) {
+       public function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) {
                $this->assertEquals( $expected, wfIsBadImage( $name, $title, $blacklist ), $desc );
        }
 
index 4184d15..9bb7487 100644 (file)
@@ -1,9 +1,11 @@
 <?php
 /**
- * Tests for wfAssembleUrl()
+ * @covers ::wfAssembleUrl
  */
 class WfAssembleUrlTest extends MediaWikiTestCase {
-       /** @dataProvider provideURLParts */
+       /**
+        * @dataProvider provideURLParts
+        */
        public function testWfAssembleUrl( $parts, $output ) {
                $partsDump = print_r( $parts, true );
                $this->assertEquals(
index baf9cee..a01c0d4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Tests for wfBCP47()
+ * @covers ::wfBCP47
  */
 class WfBCP47Test extends MediaWikiTestCase {
        /**
@@ -13,7 +13,7 @@ class WfBCP47Test extends MediaWikiTestCase {
         * @see http://tools.ietf.org/html/bcp47
         * @dataProvider provideLanguageCodes()
         */
-       function testBCP47( $code, $expected ) {
+       public function testBCP47( $code, $expected ) {
                $code = strtolower( $code );
                $this->assertEquals( $expected, wfBCP47( $code ),
                        "Applying BCP47 standard to lower case '$code'"
index c60f223..7da804e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Tests for wfBaseConvert()
+ * @covers ::wfBaseConvert
  */
 class WfBaseConvertTest extends MediaWikiTestCase {
        public static function provideSingleDigitConversions() {
index 3c4fa20..8c54804 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 /**
- * Tests for wfBaseName()
+ * @covers ::wfBaseName
  */
 class WfBaseNameTest extends MediaWikiTestCase {
        /**
         * @dataProvider providePaths
         */
-       function testBaseName( $fullpath, $basename ) {
+       public function testBaseName( $fullpath, $basename ) {
                $this->assertEquals( $basename, wfBaseName( $fullpath ),
                        "wfBaseName('$fullpath') => '$basename'" );
        }
index 5b622c1..41230a1 100644 (file)
@@ -1,9 +1,11 @@
 <?php
 /**
- * Tests for wfExpandUrl()
+ * @covers ::wfExpandUrl
  */
 class WfExpandUrlTest extends MediaWikiTestCase {
-       /** @dataProvider provideExpandableUrls */
+       /**
+        * @dataProvider provideExpandableUrls
+        */
        public function testWfExpandUrl( $fullUrl, $shortUrl, $defaultProto, $server, $canServer, $httpsMode, $message ) {
                // Fake $wgServer and $wgCanonicalServer
                $this->setMwGlobals( array(
index 3521d18..6229624 100644 (file)
@@ -1,8 +1,11 @@
 <?php
 
+/**
+ * @covers ::wfGetCaller
+ */
 class WfGetCallerTest extends MediaWikiTestCase {
 
-       function testZero() {
+       public function testZero() {
                $this->assertEquals( __METHOD__, wfGetCaller( 1 ) );
        }
 
@@ -10,7 +13,7 @@ class WfGetCallerTest extends MediaWikiTestCase {
                return wfGetCaller();
        }
 
-       function testOne() {
+       public function testOne() {
                $this->assertEquals( 'WfGetCallerTest::testOne', self::callerOne() );
        }
 
@@ -22,11 +25,11 @@ class WfGetCallerTest extends MediaWikiTestCase {
                return wfGetCaller( $level );
        }
 
-       function testTwo() {
+       public function testTwo() {
                $this->assertEquals( 'WfGetCallerTest::testTwo', self::intermediateFunction() );
        }
 
-       function testN() {
+       public function testN() {
                $this->assertEquals( 'WfGetCallerTest::testN', self::intermediateFunction( 2, 0 ) );
                $this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( 1, 0 ) );
 
index 841a1b1..5032dc1 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * Tests for wfParseUrl()
- *
  * Copyright © 2013 Alexandre Emsenhuber
  *
  * This program is free software; you can redistribute it and/or modify
@@ -22,6 +20,9 @@
  * @file
  */
 
+/**
+ * @covers ::wfParseUrl
+ */
 class WfParseUrlTest extends MediaWikiTestCase {
        protected function setUp() {
                parent::setUp();
@@ -31,7 +32,9 @@ class WfParseUrlTest extends MediaWikiTestCase {
                ) );
        }
 
-       /** @dataProvider provideURLs */
+       /**
+        * @dataProvider provideURLs
+        */
        public function testWfParseUrl( $url, $parts ) {
                $partsDump = var_export( $parts, true );
                $this->assertEquals(
index 67861ee..238a2c9 100644 (file)
@@ -1,9 +1,11 @@
 <?php
 /**
- * Tests for wfRemoveDotSegments()
+ *@covers ::wfRemoveDotSegments
  */
 class WfRemoveDotSegmentsTest extends MediaWikiTestCase {
-       /** @dataProvider providePaths */
+       /**
+        * @dataProvider providePaths
+        */
        public function testWfRemoveDotSegments( $inputPath, $outputPath ) {
                $this->assertEquals(
                        $outputPath,
index 604f901..aadec87 100644 (file)
@@ -1,10 +1,13 @@
 <?php
 
+/**
+ * @covers ::wfShorthandToInteger
+ */
 class WfShorthandToIntegerTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideABunchOfShorthands
         */
-       function testWfShorthandToInteger( $input, $output, $description ) {
+       public function testWfShorthandToInteger( $input, $output, $description ) {
                $this->assertEquals(
                        wfShorthandToInteger( $input ),
                        $output,
index 32bb49d..5998f18 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 /*
- * Tests for wfTimestamp()
+ * @covers ::wfTimestamp
  */
 class WfTimestampTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideNormalTimestamps
         */
-       function testNormalTimestamps( $input, $format, $output, $desc ) {
+       public function testNormalTimestamps( $input, $format, $output, $desc ) {
                $this->assertEquals( $output, wfTimestamp( $format, $input ), $desc );
        }
 
@@ -57,7 +57,7 @@ class WfTimestampTest extends MediaWikiTestCase {
         * See r74778 and bug 25451
         * @dataProvider provideOldTimestamps
         */
-       function testOldTimestamps( $input, $format, $output, $desc ) {
+       public function testOldTimestamps( $input, $format, $output, $desc ) {
                $this->assertEquals( $output, wfTimestamp( $format, $input ), $desc );
        }
 
@@ -96,7 +96,7 @@ class WfTimestampTest extends MediaWikiTestCase {
         * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
         * @dataProvider provideHttpDates
         */
-       function testHttpDate( $input, $output, $desc ) {
+       public function testHttpDate( $input, $output, $desc ) {
                $this->assertEquals( $output, wfTimestamp( TS_MW, $input ), $desc );
        }
 
@@ -114,7 +114,7 @@ class WfTimestampTest extends MediaWikiTestCase {
         * There are a number of assumptions in our codebase where wfTimestamp()
         * should give the current date but it is not given a 0 there. See r71751 CR
         */
-       function testTimestampParameter() {
+       public function testTimestampParameter() {
                $now = wfTimestamp( TS_UNIX );
                // We check that wfTimestamp doesn't return false (error) and use a LessThan assert
                // for the cases where the test is run in a second boundary.
index 77685d5..ce6c82c 100644 (file)
@@ -1,18 +1,21 @@
 <?php
 /**
- * Tests for wfUrlencode()
- *
  * The function only need a string parameter and might react to IIS7.0
+ * @covers ::wfUrlencode
  */
 class WfUrlencodeTest extends MediaWikiTestCase {
        #### TESTS ##############################################################
 
-       /** @dataProvider provideURLS */
+       /**
+        * @dataProvider provideURLS
+        */
        public function testEncodingUrlWith( $input, $expected ) {
                $this->verifyEncodingFor( 'Apache', $input, $expected );
        }
 
-       /** @dataProvider provideURLS */
+       /**
+        * @dataProvider provideURLS
+        */
        public function testEncodingUrlWithMicrosoftIis7( $input, $expected ) {
                $this->verifyEncodingFor( 'Microsoft-IIS/7', $input, $expected );
        }
index 5bbafd3..39c3959 100644 (file)
@@ -1,7 +1,8 @@
 <?php
 
 /**
- * Unit tests for the HTMLCheckMatrix form field
+ * Unit tests for the HTMLCheckMatrix + HTMLFormField
+ * @todo the tests for the two classes could be split up
  */
 class HtmlCheckMatrixTest extends MediaWikiTestCase {
        static private $defaultOptions = array(
@@ -10,6 +11,9 @@ class HtmlCheckMatrixTest extends MediaWikiTestCase {
                'fieldname' => 'test',
        );
 
+       /**
+        * @covers HTMLCheckMatrix::__construct
+        */
        public function testPlainInstantiation() {
                try {
                        $form = new HTMLCheckMatrix( array() );
@@ -21,11 +25,17 @@ class HtmlCheckMatrixTest extends MediaWikiTestCase {
                $this->fail( 'Expected MWException indicating missing parameters but none was thrown.' );
        }
 
+       /**
+        * @covers HTMLCheckMatrix::__construct
+        */
        public function testInstantiationWithMinimumRequiredParameters() {
                $form = new HTMLCheckMatrix( self::$defaultOptions );
                $this->assertTrue( true ); // form instantiation must throw exception on failure
        }
 
+       /**
+        * @covers HTMLFormField::validate
+        */
        public function testValidateCallsUserDefinedValidationCallback() {
                $called = false;
                $field = new HTMLCheckMatrix( self::$defaultOptions + array(
@@ -38,6 +48,9 @@ class HtmlCheckMatrixTest extends MediaWikiTestCase {
                $this->assertTrue( $called );
        }
 
+       /**
+        * @covers HTMLFormField::validate
+        */
        public function testValidateRequiresArrayInput() {
                $field = new HTMLCheckMatrix( self::$defaultOptions );
                $this->assertEquals( false, $this->validate( $field, null ) );
@@ -47,11 +60,17 @@ class HtmlCheckMatrixTest extends MediaWikiTestCase {
                $this->assertEquals( true, $this->validate( $field, array() ) );
        }
 
+       /**
+        * @covers HTMLFormField::validate
+        */
        public function testValidateAllowsOnlyKnownTags() {
                $field = new HTMLCheckMatrix( self::$defaultOptions );
                $this->assertInternalType( 'string', $this->validate( $field, array( 'foo' ) ) );
        }
 
+       /**
+        * @covers HTMLFormField::validate
+        */
        public function testValidateAcceptsPartialTagList() {
                $field = new HTMLCheckMatrix( self::$defaultOptions );
                $this->assertTrue( $this->validate( $field, array() ) );
@@ -65,6 +84,7 @@ class HtmlCheckMatrixTest extends MediaWikiTestCase {
         * foreach ( $field->filterDataForSubmit( $data ) as $k => $v ) {
         *     $user->setOption( $k, $v );
         * }
+        * @covers HTMLFormField::filterDataForSubmit
         */
        public function testValuesForcedOnRemainOn() {
                $field = new HTMLCheckMatrix( self::$defaultOptions + array(
@@ -79,6 +99,9 @@ class HtmlCheckMatrixTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $field->filterDataForSubmit( array() ) );
        }
 
+       /**
+        * @covers HTMLFormField::filterDataForSubmit
+        */
        public function testValuesForcedOffRemainOff() {
                $field = new HTMLCheckMatrix( self::$defaultOptions + array(
                        'force-options-off' => array( 'c1-r2', 'c2-r2' ),
index bc4e499..68dfea1 100644 (file)
@@ -4,7 +4,10 @@
  * @group HashRing
  */
 class HashRingTest extends MediaWikiTestCase {
-       function testHashRing() {
+       /**
+        * @covers HashRing
+        */
+       public function testHashRing() {
                $ring = new HashRing( array( 's1' => 1, 's2' => 1, 's3' => 2, 's4' => 2, 's5' => 2, 's6' => 3 ) );
 
                $locations = array();
index 81dd487..87af6c1 100644 (file)
@@ -35,6 +35,7 @@ class HooksTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideHooks
+        * @covers ::wfRunHooks
         */
        public function testOldStyleHooks( $msg, array $hook, $expectedFoo, $expectedBar ) {
                global $wgHooks;
@@ -49,6 +50,8 @@ class HooksTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideHooks
+        * @covers Hooks::register
+        * @covers Hooks::run
         */
        public function testNewStyleHooks( $msg, $hook, $expectedFoo, $expectedBar ) {
                $foo = $bar = 'original';
@@ -60,6 +63,12 @@ class HooksTest extends MediaWikiTestCase {
                $this->assertSame( $expectedBar, $bar, $msg );
        }
 
+       /**
+        * @covers Hooks::isRegistered
+        * @covers Hooks::register
+        * @covers Hooks::getHandlers
+        * @covers Hooks::run
+        */
        public function testNewStyleHookInteraction() {
                global $wgHooks;
 
@@ -82,12 +91,16 @@ class HooksTest extends MediaWikiTestCase {
 
        /**
         * @expectedException MWException
+        * @covers Hooks::run
         */
        public function testUncallableFunction() {
                Hooks::register( 'MediaWikiHooksTest001', 'ThisFunctionDoesntExist' );
                Hooks::run( 'MediaWikiHooksTest001', array() );
        }
 
+       /**
+        * @covers Hooks::run
+        */
        public function testFalseReturn() {
                Hooks::register( 'MediaWikiHooksTest001', function ( &$foo ) {
                        return false;
@@ -104,6 +117,7 @@ class HooksTest extends MediaWikiTestCase {
 
        /**
         * @expectedException FatalError
+        * @covers Hooks::run
         */
        public function testFatalError() {
                Hooks::register( 'MediaWikiHooksTest001', function () {
index a37df74..7ef0b60 100644 (file)
@@ -6,6 +6,7 @@
 class HtmlFormatterTest extends MediaWikiTestCase {
        /**
         * @dataProvider getHtmlData
+        * @covers HtmlFormatter::getText
         */
        public function testTransform( $input, $expected, $callback = false ) {
                $input = self::normalize( $input );
index ecfe418..21372a0 100644 (file)
@@ -41,6 +41,9 @@ class HtmlTest extends MediaWikiTestCase {
                ) );
        }
 
+       /**
+        * @covers Html::element
+        */
        public function testElementBasics() {
                $this->assertEquals(
                        '<img>',
@@ -89,11 +92,15 @@ class HtmlTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider dataXmlMimeType
+        * @covers Html::isXmlMimeType
         */
        public function testXmlMimeType( $mimetype, $isXmlMimeType ) {
                $this->assertEquals( $isXmlMimeType, Html::isXmlMimeType( $mimetype ) );
        }
 
+       /**
+        * @covers HTML::expandAttributes
+        */
        public function testExpandAttributesSkipsNullAndFalse() {
 
                ### EMPTY ########
@@ -111,6 +118,9 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers HTML::expandAttributes
+        */
        public function testExpandAttributesForBooleans() {
                $this->assertEquals(
                        '',
@@ -146,6 +156,7 @@ class HtmlTest extends MediaWikiTestCase {
        /**
         * Test for Html::expandAttributes()
         * Please note it output a string prefixed with a space!
+        * @covers Html::expandAttributes
         */
        public function testExpandAttributesVariousExpansions() {
                ### NOT EMPTY ####
@@ -198,6 +209,7 @@ class HtmlTest extends MediaWikiTestCase {
         * Html::expandAttributes has special features for HTML
         * attributes that use space separated lists and also
         * allows arrays to be used as values.
+        * @covers Html::expandAttributes
         */
        public function testExpandAttributesListValueAttributes() {
                ### STRING VALUES
@@ -249,8 +261,9 @@ class HtmlTest extends MediaWikiTestCase {
        /**
         * Test feature added by r96188, let pass attributes values as
         * a PHP array. Restricted to class,rel, accesskey.
+        * @covers Html::expandAttributes
         */
-       function testExpandAttributesSpaceSeparatedAttributesWithBoolean() {
+       public function testExpandAttributesSpaceSeparatedAttributesWithBoolean() {
                $this->assertEquals(
                        ' class="booltrue one"',
                        Html::expandAttributes( array( 'class' => array(
@@ -273,8 +286,9 @@ class HtmlTest extends MediaWikiTestCase {
         * The later will take precedence.
         *
         * Feature added by r96188
+        * @covers Html::expandAttributes
         */
-       function testValueIsAuthoritativeInSpaceSeparatedAttributesArrays() {
+       public function testValueIsAuthoritativeInSpaceSeparatedAttributesArrays() {
                $this->assertEquals(
                        ' class=""',
                        Html::expandAttributes( array( 'class' => array(
@@ -285,7 +299,10 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
-       function testNamespaceSelector() {
+       /**
+        * @covers Html::namespaceSelector
+        */
+       public function testNamespaceSelector() {
                $this->assertEquals(
                        '<select id=namespace name=namespace>' . "\n" .
                                '<option value=0>(Main)</option>' . "\n" .
@@ -364,7 +381,7 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
-       function testCanFilterOutNamespaces() {
+       public function testCanFilterOutNamespaces() {
                $this->assertEquals(
                        '<select id=namespace name=namespace>' . "\n" .
                                '<option value=2>User</option>' . "\n" .
@@ -386,7 +403,7 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
-       function testCanDisableANamespaces() {
+       public function testCanDisableANamespaces() {
                $this->assertEquals(
                        '<select id=namespace name=namespace>' . "\n" .
                                '<option disabled value=0>(Main)</option>' . "\n" .
@@ -415,8 +432,9 @@ class HtmlTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideHtml5InputTypes
+        * @covers Html::element
         */
-       function testHtmlElementAcceptsNewHtml5TypesInHtml5Mode( $HTML5InputType ) {
+       public function testHtmlElementAcceptsNewHtml5TypesInHtml5Mode( $HTML5InputType ) {
                $this->assertEquals(
                        '<input type=' . $HTML5InputType . '>',
                        Html::element( 'input', array( 'type' => $HTML5InputType ) ),
@@ -457,7 +475,7 @@ class HtmlTest extends MediaWikiTestCase {
         * @covers Html::dropDefaults
         * @dataProvider provideElementsWithAttributesHavingDefaultValues
         */
-       function testDropDefaults( $expected, $element, $attribs, $message = '' ) {
+       public function testDropDefaults( $expected, $element, $attribs, $message = '' ) {
                $this->assertEquals( $expected, Html::element( $element, $attribs ), $message );
        }
 
@@ -617,6 +635,9 @@ class HtmlTest extends MediaWikiTestCase {
                return $ret;
        }
 
+       /**
+        * @covers Html::expandAttributes
+        */
        public function testFormValidationBlacklist() {
                $this->assertEmpty(
                        Html::expandAttributes( array( 'min' => 1, 'max' => 100, 'pattern' => 'abc', 'required' => true, 'step' => 2 ) ),
index 6e0aa88..11d8ed6 100644 (file)
@@ -53,7 +53,7 @@ class HttpTest extends MediaWikiTestCase {
         * @dataProvider provideURI
         * @covers Http::isValidURI
         */
-       function testIsValidUri( $expect, $URI, $message = '' ) {
+       public function testIsValidUri( $expect, $URI, $message = '' ) {
                $this->assertEquals(
                        $expect,
                        (bool)Http::isValidURI( $URI ),
index 22bf0c0..c074eea 100644 (file)
@@ -392,7 +392,7 @@ class IPTest extends MediaWikiTestCase {
         * representing the network mask and the bit mask.
         * @covers IP::parseCIDR
         */
-       function testCIDRParsing() {
+       public function testCIDRParsing() {
                $this->assertFalseCIDR( '192.0.2.0', "missing mask" );
                $this->assertFalseCIDR( '192.0.2.0/', "missing bitmask" );
 
@@ -489,7 +489,7 @@ class IPTest extends MediaWikiTestCase {
         * Test for IP::splitHostAndPort().
         * @dataProvider provideSplitHostAndPort
         */
-       function testSplitHostAndPort( $expected, $input, $description ) {
+       public function testSplitHostAndPort( $expected, $input, $description ) {
                $this->assertEquals( $expected, IP::splitHostAndPort( $input ), $description );
        }
 
@@ -516,7 +516,7 @@ class IPTest extends MediaWikiTestCase {
         * Test for IP::combineHostAndPort()
         * @dataProvider provideCombineHostAndPort
         */
-       function testCombineHostAndPort( $expected, $input, $description ) {
+       public function testCombineHostAndPort( $expected, $input, $description ) {
                list( $host, $port, $defaultPort ) = $input;
                $this->assertEquals(
                        $expected,
@@ -540,7 +540,7 @@ class IPTest extends MediaWikiTestCase {
         * Test for IP::sanitizeRange()
         * @dataProvider provideIPCIDRs
         */
-       function testSanitizeRange( $input, $expected, $description ) {
+       public function testSanitizeRange( $input, $expected, $description ) {
                $this->assertEquals( $expected, IP::sanitizeRange( $input ), $description );
        }
 
@@ -564,7 +564,7 @@ class IPTest extends MediaWikiTestCase {
         * Test for IP::prettifyIP()
         * @dataProvider provideIPsToPrettify
         */
-       function testPrettifyIP( $ip, $prettified ) {
+       public function testPrettifyIP( $ip, $prettified ) {
                $this->assertEquals( $prettified, IP::prettifyIP( $ip ), "Prettify of $ip" );
        }
 
index 070a680..d4ccca9 100644 (file)
@@ -1,7 +1,9 @@
 <?php
 
 class LanguageConverterTest extends MediaWikiLangTestCase {
+       /** @var LanguageToTest */
        protected $lang = null;
+       /** @var TestConverter */
        protected $lc = null;
 
        protected function setUp() {
@@ -30,39 +32,61 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
                parent::tearDown();
        }
 
-       function testGetPreferredVariantDefaults() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        */
+       public function testGetPreferredVariantDefaults() {
                $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaders() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        * @covers LanguageConverter::getHeaderVariant
+        */
+       public function testGetPreferredVariantHeaders() {
                global $wgRequest;
                $wgRequest->setHeader( 'Accept-Language', 'tg-latn' );
 
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaderWeight() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        * @covers LanguageConverter::getHeaderVariant
+        */
+       public function testGetPreferredVariantHeaderWeight() {
                global $wgRequest;
                $wgRequest->setHeader( 'Accept-Language', 'tg;q=1' );
 
                $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaderWeight2() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        * @covers LanguageConverter::getHeaderVariant
+        */
+       public function testGetPreferredVariantHeaderWeight2() {
                global $wgRequest;
                $wgRequest->setHeader( 'Accept-Language', 'tg-latn;q=1' );
 
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaderMulti() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        * @covers LanguageConverter::getHeaderVariant
+        */
+       public function testGetPreferredVariantHeaderMulti() {
                global $wgRequest;
                $wgRequest->setHeader( 'Accept-Language', 'en, tg-latn;q=1' );
 
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantUserOption() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        */
+       public function testGetPreferredVariantUserOption() {
                global $wgUser;
 
                $wgUser = new User;
@@ -75,7 +99,11 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantUserOptionForForeignLanguage() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        * @covers LanguageConverter::getUserVariant
+        */
+       public function testGetPreferredVariantUserOptionForForeignLanguage() {
                global $wgContLang, $wgUser;
 
                $wgContLang = Language::factory( 'en' );
@@ -89,7 +117,12 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaderUserVsUrl() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        * @covers LanguageConverter::getUserVariant
+        * @covers LanguageConverter::getURLVariant
+        */
+       public function testGetPreferredVariantHeaderUserVsUrl() {
                global $wgContLang, $wgRequest, $wgUser;
 
                $wgContLang = Language::factory( 'tg-latn' );
@@ -103,15 +136,21 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
                $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
        }
 
-
-       function testGetPreferredVariantDefaultLanguageVariant() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        */
+       public function testGetPreferredVariantDefaultLanguageVariant() {
                global $wgDefaultLanguageVariant;
 
                $wgDefaultLanguageVariant = 'tg-latn';
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantDefaultLanguageVsUrlVariant() {
+       /**
+        * @covers LanguageConverter::getPreferredVariant
+        * @covers LanguageConverter::getURLVariant
+        */
+       public function testGetPreferredVariantDefaultLanguageVsUrlVariant() {
                global $wgDefaultLanguageVariant, $wgRequest, $wgContLang;
 
                $wgContLang = Language::factory( 'tg-latn' );
index 212b3b3..63b2c39 100644 (file)
@@ -1,8 +1,11 @@
 <?php
 
+/**
+ * @covers Licenses
+ */
 class LicensesTest extends MediaWikiTestCase {
 
-       function testLicenses() {
+       public function testLicenses() {
                $str = "
 * Free licenses:
 ** GFDL|Debian disagrees
index ec4d98e..b605f08 100644 (file)
@@ -6,7 +6,7 @@ class LinkerTest extends MediaWikiLangTestCase {
         * @dataProvider provideCasesForUserLink
         * @covers Linker::userLink
         */
-       function testUserLink( $expected, $userId, $userName, $altUserName = false, $msg = '' ) {
+       public function testUserLink( $expected, $userId, $userName, $altUserName = false, $msg = '' ) {
                $this->setMwGlobals( array(
                        'wgArticlePath' => '/wiki/$1',
                        'wgWellFormedXml' => true,
index 5ade250..b37ff2e 100644 (file)
@@ -52,6 +52,9 @@ class LinksUpdateTest extends MediaWikiTestCase {
                return array( $t, $po );
        }
 
+       /**
+        * @covers LinksUpdate::addLink
+        */
        public function testUpdate_pagelinks() {
                list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
 
@@ -86,6 +89,9 @@ class LinksUpdateTest extends MediaWikiTestCase {
                ), $update->getRemovedLinks() );
        }
 
+       /**
+        * @covers LinksUpdate::addExternalLink
+        */
        public function testUpdate_externallinks() {
                list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
 
@@ -96,6 +102,9 @@ class LinksUpdateTest extends MediaWikiTestCase {
                ) );
        }
 
+       /**
+        * @covers LinksUpdate::addCategory
+        */
        public function testUpdate_categorylinks() {
                $this->setMwGlobals( 'wgCategoryCollation', 'uppercase' );
 
@@ -108,6 +117,9 @@ class LinksUpdateTest extends MediaWikiTestCase {
                ) );
        }
 
+       /**
+        * @covers LinksUpdate::addInterwikiLink
+        */
        public function testUpdate_iwlinks() {
                list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
 
@@ -119,6 +131,9 @@ class LinksUpdateTest extends MediaWikiTestCase {
                ) );
        }
 
+       /**
+        * @covers LinksUpdate::addTemplate
+        */
        public function testUpdate_templatelinks() {
                list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
 
@@ -129,6 +144,9 @@ class LinksUpdateTest extends MediaWikiTestCase {
                ) );
        }
 
+       /**
+        * @covers LinksUpdate::addImage
+        */
        public function testUpdate_imagelinks() {
                list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
 
@@ -139,6 +157,9 @@ class LinksUpdateTest extends MediaWikiTestCase {
                ) );
        }
 
+       /**
+        * @covers LinksUpdate::addLanguageLink
+        */
        public function testUpdate_langlinks() {
                list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
 
@@ -149,6 +170,9 @@ class LinksUpdateTest extends MediaWikiTestCase {
                ) );
        }
 
+       /**
+        * @covers LinksUpdate::setProperty
+        */
        public function testUpdate_page_props() {
                list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
 
index d6f0d2e..694f4ae 100644 (file)
@@ -3,6 +3,7 @@
 /**
  * These tests should work regardless of $wgCapitalLinks
  * @group Database
+ * @todo Split tests into providers and test methods
  */
 
 class LocalFileTest extends MediaWikiTestCase {
@@ -35,72 +36,105 @@ class LocalFileTest extends MediaWikiTestCase {
                $this->file_lc = $this->repo_lc->newFile( 'test!' );
        }
 
-       function testGetHashPath() {
+       /**
+        * @covers File::getHashPath
+        */
+       public function testGetHashPath() {
                $this->assertEquals( '', $this->file_hl0->getHashPath() );
                $this->assertEquals( 'a/a2/', $this->file_hl2->getHashPath() );
                $this->assertEquals( 'c/c4/', $this->file_lc->getHashPath() );
        }
 
-       function testGetRel() {
+       /**
+        * @covers File::getRel
+        */
+       public function testGetRel() {
                $this->assertEquals( 'Test!', $this->file_hl0->getRel() );
                $this->assertEquals( 'a/a2/Test!', $this->file_hl2->getRel() );
                $this->assertEquals( 'c/c4/test!', $this->file_lc->getRel() );
        }
 
-       function testGetUrlRel() {
+       /**
+        * @covers File::getUrlRel
+        */
+       public function testGetUrlRel() {
                $this->assertEquals( 'Test%21', $this->file_hl0->getUrlRel() );
                $this->assertEquals( 'a/a2/Test%21', $this->file_hl2->getUrlRel() );
                $this->assertEquals( 'c/c4/test%21', $this->file_lc->getUrlRel() );
        }
 
-       function testGetArchivePath() {
+       /**
+        * @covers File::getArchivePath
+        */
+       public function testGetArchivePath() {
                $this->assertEquals( 'mwstore://local-backend/test-public/archive', $this->file_hl0->getArchivePath() );
                $this->assertEquals( 'mwstore://local-backend/test-public/archive/a/a2', $this->file_hl2->getArchivePath() );
                $this->assertEquals( 'mwstore://local-backend/test-public/archive/!', $this->file_hl0->getArchivePath( '!' ) );
                $this->assertEquals( 'mwstore://local-backend/test-public/archive/a/a2/!', $this->file_hl2->getArchivePath( '!' ) );
        }
 
-       function testGetThumbPath() {
+       /**
+        * @covers File::getThumbPath
+        */
+       public function testGetThumbPath() {
                $this->assertEquals( 'mwstore://local-backend/test-thumb/Test!', $this->file_hl0->getThumbPath() );
                $this->assertEquals( 'mwstore://local-backend/test-thumb/a/a2/Test!', $this->file_hl2->getThumbPath() );
                $this->assertEquals( 'mwstore://local-backend/test-thumb/Test!/x', $this->file_hl0->getThumbPath( 'x' ) );
                $this->assertEquals( 'mwstore://local-backend/test-thumb/a/a2/Test!/x', $this->file_hl2->getThumbPath( 'x' ) );
        }
 
-       function testGetArchiveUrl() {
+       /**
+        * @covers File::getArchiveUrl
+        */
+       public function testGetArchiveUrl() {
                $this->assertEquals( '/testurl/archive', $this->file_hl0->getArchiveUrl() );
                $this->assertEquals( '/testurl/archive/a/a2', $this->file_hl2->getArchiveUrl() );
                $this->assertEquals( '/testurl/archive/%21', $this->file_hl0->getArchiveUrl( '!' ) );
                $this->assertEquals( '/testurl/archive/a/a2/%21', $this->file_hl2->getArchiveUrl( '!' ) );
        }
 
-       function testGetThumbUrl() {
+       /**
+        * @covers File::getThumbUrl
+        */
+       public function testGetThumbUrl() {
                $this->assertEquals( '/testurl/thumb/Test%21', $this->file_hl0->getThumbUrl() );
                $this->assertEquals( '/testurl/thumb/a/a2/Test%21', $this->file_hl2->getThumbUrl() );
                $this->assertEquals( '/testurl/thumb/Test%21/x', $this->file_hl0->getThumbUrl( 'x' ) );
                $this->assertEquals( '/testurl/thumb/a/a2/Test%21/x', $this->file_hl2->getThumbUrl( 'x' ) );
        }
 
-       function testGetArchiveVirtualUrl() {
+       /**
+        * @covers File::getArchiveVirtualUrl
+        */
+       public function testGetArchiveVirtualUrl() {
                $this->assertEquals( 'mwrepo://test/public/archive', $this->file_hl0->getArchiveVirtualUrl() );
                $this->assertEquals( 'mwrepo://test/public/archive/a/a2', $this->file_hl2->getArchiveVirtualUrl() );
                $this->assertEquals( 'mwrepo://test/public/archive/%21', $this->file_hl0->getArchiveVirtualUrl( '!' ) );
                $this->assertEquals( 'mwrepo://test/public/archive/a/a2/%21', $this->file_hl2->getArchiveVirtualUrl( '!' ) );
        }
 
-       function testGetThumbVirtualUrl() {
+       /**
+        * @covers File::getThumbVirtualUrl
+        */
+       public function testGetThumbVirtualUrl() {
                $this->assertEquals( 'mwrepo://test/thumb/Test%21', $this->file_hl0->getThumbVirtualUrl() );
                $this->assertEquals( 'mwrepo://test/thumb/a/a2/Test%21', $this->file_hl2->getThumbVirtualUrl() );
                $this->assertEquals( 'mwrepo://test/thumb/Test%21/%21', $this->file_hl0->getThumbVirtualUrl( '!' ) );
                $this->assertEquals( 'mwrepo://test/thumb/a/a2/Test%21/%21', $this->file_hl2->getThumbVirtualUrl( '!' ) );
        }
 
-       function testGetUrl() {
+       /**
+        * @covers File::getUrl
+        */
+       public function testGetUrl() {
                $this->assertEquals( '/testurl/Test%21', $this->file_hl0->getUrl() );
                $this->assertEquals( '/testurl/a/a2/Test%21', $this->file_hl2->getUrl() );
        }
 
-       function testWfLocalFile() {
+       /**
+        * @covers ::wfLocalFile
+        */
+       public function testWfLocalFile() {
                $file = wfLocalFile( "File:Some_file_that_probably_doesn't exist.png" );
                $this->assertThat( $file, $this->isInstanceOf( 'LocalFile' ), 'wfLocalFile() returns LocalFile for valid Titles' );
        }
index b34847a..f98410a 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @covers LocalisationCache
+ */
 class LocalisationCacheTest extends MediaWikiTestCase {
        public function testPuralRulesFallback() {
                $cache = Language::getLocalisationCache();
index a44f69e..f2a720e 100644 (file)
@@ -1,7 +1,10 @@
 <?php
 
+/**
+ * @covers MWFunction
+ */
 class MWFunctionTest extends MediaWikiTestCase {
-       function testNewObjFunction() {
+       public function testNewObjFunction() {
                $arg1 = 'Foo';
                $arg2 = 'Bar';
                $arg3 = array( 'Baz' );
index 10e9db6..b6fa139 100644 (file)
@@ -8,6 +8,8 @@
 /**
  * Test class for MWNamespace.
  * Generated by PHPUnit on 2011-02-20 at 21:01:55.
+ * @todo covers tags
+ * @FIXME this test file is a mess
  *
  */
 class MWNamespaceTest extends MediaWikiTestCase {
@@ -31,6 +33,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
 
        /**
         * @todo Write more texts, handle $wgAllowImageMoving setting
+        * @covers MWNamespace::isMovable
         */
        public function testIsMovable() {
                $this->assertFalse( MWNamespace::isMovable( NS_CATEGORY ) );
@@ -39,6 +42,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
 
        /**
         * Please make sure to change testIsTalk() if you change the assertions below
+        * @covers MWNamespace::isSubject
         */
        public function testIsSubject() {
                // Special namespaces
@@ -59,6 +63,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        /**
         * Reverse of testIsSubject().
         * Please update testIsSubject() if you change assertions below
+        * @covers MWNamespace::isTalk
         */
        public function testIsTalk() {
                // Special namespaces
@@ -77,6 +82,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers MWNamespace::getSubject
         */
        public function testGetSubject() {
                // Special namespaces are their own subjects
@@ -91,6 +97,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         * Regular getTalk() calls
         * Namespaces without a talk page (NS_MEDIA, NS_SPECIAL) are tested in
         * the function testGetTalkExceptions()
+        * @covers MWNamespace::getTalk
         */
        public function testGetTalk() {
                $this->assertEquals( NS_TALK, MWNamespace::getTalk( NS_MAIN ) );
@@ -103,6 +110,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         * Exceptions with getTalk()
         * NS_MEDIA does not have talk pages. MediaWiki raise an exception for them.
         * @expectedException MWException
+        * @covers MWNamespace::getTalk
         */
        public function testGetTalkExceptionsForNsMedia() {
                $this->assertNull( MWNamespace::getTalk( NS_MEDIA ) );
@@ -112,6 +120,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         * Exceptions with getTalk()
         * NS_SPECIAL does not have talk pages. MediaWiki raise an exception for them.
         * @expectedException MWException
+        * @covers MWNamespace::getTalk
         */
        public function testGetTalkExceptionsForNsSpecial() {
                $this->assertNull( MWNamespace::getTalk( NS_SPECIAL ) );
@@ -121,6 +130,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         * Regular getAssociated() calls
         * Namespaces without an associated page (NS_MEDIA, NS_SPECIAL) are tested in
         * the function testGetAssociatedExceptions()
+        * @covers MWNamespace::getAssociated
         */
        public function testGetAssociated() {
                $this->assertEquals( NS_TALK, MWNamespace::getAssociated( NS_MAIN ) );
@@ -132,6 +142,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        ### an exception for them.
        /**
         * @expectedException MWException
+        * @covers MWNamespace::getAssociated
         */
        public function testGetAssociatedExceptionsForNsMedia() {
                $this->assertNull( MWNamespace::getAssociated( NS_MEDIA ) );
@@ -139,6 +150,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
 
        /**
         * @expectedException MWException
+        * @covers MWNamespace::getAssociated
         */
        public function testGetAssociatedExceptionsForNsSpecial() {
                $this->assertNull( MWNamespace::getAssociated( NS_SPECIAL ) );
@@ -161,6 +173,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         * Note if we add a namespace registration system with keys like 'MAIN'
         * we should add tests here for equivilance on things like 'MAIN' == 0
         * and 'MAIN' == NS_MAIN.
+        * @covers MWNamespace::equals
         */
        public function testEquals() {
                $this->assertTrue( MWNamespace::equals( NS_MAIN, NS_MAIN ) );
@@ -175,7 +188,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        }
 
        /**
-        * Test MWNamespace::subjectEquals
+        * @covers MWNamespace::subjectEquals
         */
        public function testSubjectEquals() {
                $this->assertSameSubject( NS_MAIN, NS_MAIN );
@@ -191,6 +204,9 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $this->assertDifferentSubject( NS_SPECIAL, NS_MAIN );
        }
 
+       /**
+        * @covers MWNamespace::subjectEquals
+        */
        public function testSpecialAndMediaAreDifferentSubjects() {
                $this->assertDifferentSubject(
                        NS_MEDIA, NS_SPECIAL,
@@ -249,6 +265,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        */
 
        /**
+        * @covers MWNamespace::canTalk
         */
        public function testCanTalk() {
                $this->assertCanNotTalk( NS_MEDIA );
@@ -265,6 +282,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers MWNamespace::isContent
         */
        public function testIsContent() {
                // NS_MAIN is a content namespace per DefaultSettings.php
@@ -285,6 +303,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        /**
         * Similar to testIsContent() but alters the $wgContentNamespaces
         * global variable.
+        * @covers MWNamespace::isContent
         */
        public function testIsContentAdvanced() {
                global $wgContentNamespaces;
@@ -301,6 +320,9 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $this->assertIsContent( NS_MAIN );
        }
 
+       /**
+        * @covers MWNamespace::isWatchable
+        */
        public function testIsWatchable() {
                // Specials namespaces are not watchable
                $this->assertIsNotWatchable( NS_MEDIA );
@@ -315,6 +337,9 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $this->assertIsWatchable( 101 );
        }
 
+       /**
+        * @covers MWNamespace::hasSubpages
+        */
        public function testHasSubpages() {
                global $wgNamespacesWithSubpages;
 
@@ -338,6 +363,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers MWNamespace::getContentNamespaces
         */
        public function testGetContentNamespaces() {
                global $wgContentNamespaces;
@@ -388,6 +414,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers MWNamespace::getSubjectNamespaces
         */
        public function testGetSubjectNamespaces() {
                $subjectsNS = MWNamespace::getSubjectNamespaces();
@@ -403,6 +430,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers MWNamespace::getTalkNamespaces
         */
        public function testGetTalkNamespaces() {
                $talkNS = MWNamespace::getTalkNamespaces();
@@ -420,6 +448,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        /**
         * Some namespaces are always capitalized per code definition
         * in MWNamespace::$alwaysCapitalizedNamespaces
+        * @covers MWNamespace::isCapitalized
         */
        public function testIsCapitalizedHardcodedAssertions() {
                // NS_MEDIA and NS_FILE are treated the same
@@ -451,6 +480,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         *
         * Global setting correctness is tested against the NS_PROJECT and
         * NS_PROJECT_TALK namespaces since they are not hardcoded nor specials
+        * @covers MWNamespace::isCapitalized
         */
        public function testIsCapitalizedWithWgCapitalLinks() {
                global $wgCapitalLinks;
@@ -475,6 +505,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         * testing the $wgCapitalLinkOverrides global.
         *
         * @todo split groups of assertions in autonomous testing functions
+        * @covers MWNamespace::isCapitalized
         */
        public function testIsCapitalizedWithWgCapitalLinkOverrides() {
                global $wgCapitalLinkOverrides;
@@ -507,6 +538,9 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $this->assertIsCapitalized( NS_PROJECT );
        }
 
+       /**
+        * @covers MWNamespace::hasGenderDistinction
+        */
        public function testHasGenderDistinction() {
                // Namespaces with gender distinctions
                $this->assertTrue( MWNamespace::hasGenderDistinction( NS_USER ) );
@@ -519,6 +553,9 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $this->assertFalse( MWNamespace::hasGenderDistinction( NS_TALK ) );
        }
 
+       /**
+        * @covers MWNamespace::isNonincludable
+        */
        public function testIsNonincludable() {
                global $wgNonincludableNamespaces;
 
index 1ba2d40..71ebd6a 100644 (file)
@@ -10,7 +10,10 @@ class MessageTest extends MediaWikiLangTestCase {
                ) );
        }
 
-       function testExists() {
+       /**
+        * @covers Message::exists
+        */
+       public function testExists() {
                $this->assertTrue( wfMessage( 'mainpage' )->exists() );
                $this->assertTrue( wfMessage( 'mainpage' )->params( array() )->exists() );
                $this->assertTrue( wfMessage( 'mainpage' )->rawParams( 'foo', 123 )->exists() );
@@ -19,7 +22,10 @@ class MessageTest extends MediaWikiLangTestCase {
                $this->assertFalse( wfMessage( 'i-dont-exist-evar' )->rawParams( 'foo', 123 )->exists() );
        }
 
-       function testKey() {
+       /**
+        * @covers Message::__construct
+        */
+       public function testKey() {
                $this->assertInstanceOf( 'Message', wfMessage( 'mainpage' ) );
                $this->assertInstanceOf( 'Message', wfMessage( 'i-dont-exist-evar' ) );
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->text() );
@@ -28,28 +34,42 @@ class MessageTest extends MediaWikiLangTestCase {
                $this->assertEquals( '&lt;i-dont-exist-evar&gt;', wfMessage( 'i-dont-exist-evar' )->escaped() );
        }
 
-       function testInLanguage() {
+       /**
+        * @covers Message::inLanguage
+        */
+       public function testInLanguage() {
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inLanguage( 'en' )->text() );
                $this->assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )->inLanguage( 'ru' )->text() );
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inLanguage( Language::factory( 'en' ) )->text() );
                $this->assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )->inLanguage( Language::factory( 'ru' ) )->text() );
        }
 
-       function testMessageParams() {
+       /**
+        * @covers Message::__construct
+        */
+       public function testMessageParams() {
                $this->assertEquals( 'Return to $1.', wfMessage( 'returnto' )->text() );
                $this->assertEquals( 'Return to $1.', wfMessage( 'returnto', array() )->text() );
                $this->assertEquals( 'You have foo (bar).', wfMessage( 'youhavenewmessages', 'foo', 'bar' )->text() );
                $this->assertEquals( 'You have foo (bar).', wfMessage( 'youhavenewmessages', array( 'foo', 'bar' ) )->text() );
        }
 
-       function testMessageParamSubstitution() {
+       /**
+        * @covers Message::__construct
+        * @covers Message::rawParams
+        */
+       public function testMessageParamSubstitution() {
                $this->assertEquals( '(Заглавная страница)', wfMessage( 'parentheses', 'Заглавная страница' )->plain() );
                $this->assertEquals( '(Заглавная страница $1)', wfMessage( 'parentheses', 'Заглавная страница $1' )->plain() );
                $this->assertEquals( '(Заглавная страница)', wfMessage( 'parentheses' )->rawParams( 'Заглавная страница' )->plain() );
                $this->assertEquals( '(Заглавная страница $1)', wfMessage( 'parentheses' )->rawParams( 'Заглавная страница $1' )->plain() );
        }
 
-       function testDeliciouslyManyParams() {
+       /**
+        * @covers Message::__construct
+        * @covers Message::params
+        */
+       public function testDeliciouslyManyParams() {
                $msg = new RawMessage( '$1$2$3$4$5$6$7$8$9$10$11$12' );
                // One less than above has placeholders
                $params = array( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k' );
@@ -59,8 +79,15 @@ class MessageTest extends MediaWikiLangTestCase {
        /**
         * FIXME: This should not need database, but Language#formatExpiry does (bug 55912)
         * @group Database
+        * @todo this should be split up into multiple test methods
+        * @covers Message::numParams
+        * @covers Message::durationParams
+        * @covers Message::expiryParams
+        * @covers Message::timeperiodParams
+        * @covers Message::sizeParams
+        * @covers Message::bitrateParams
         */
-       function testMessageParamTypes() {
+       public function testMessageParamTypes() {
                $lang = Language::factory( 'en' );
 
                $msg = new RawMessage( '$1' );
@@ -106,13 +133,19 @@ class MessageTest extends MediaWikiLangTestCase {
                );
        }
 
-       function testInContentLanguageDisabled() {
+       /**
+        * @covers Message::inContentLanguage
+        */
+       public function testInContentLanguageDisabled() {
                $this->setMwGlobals( 'wgLang', Language::factory( 'fr' ) );
 
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inContentLanguage()->plain(), 'ForceUIMsg disabled' );
        }
 
-       function testInContentLanguageEnabled() {
+       /**
+        * @covers Message::inContentLanguage
+        */
+       public function testInContentLanguageEnabled() {
                $this->setMwGlobals( array(
                        'wgLang' => Language::factory( 'fr' ),
                        'wgForceUIMsgAsContentMsg' => array( 'mainpage' ),
@@ -123,8 +156,9 @@ class MessageTest extends MediaWikiLangTestCase {
 
        /**
         * @expectedException MWException
+        * @covers Message::inLanguage
         */
-       function testInLanguageThrows() {
+       public function testInLanguageThrows() {
                wfMessage( 'foo' )->inLanguage( 123 );
        }
 }
index 56bb0fc..385cee5 100644 (file)
@@ -6,6 +6,8 @@
  *
  * @group Output
  *
+ * @todo factor tests in this class into providers and test methods
+ *
  */
 class OutputPageTest extends MediaWikiTestCase {
        const SCREEN_MEDIA_QUERY = 'screen and (min-width: 982px)';
@@ -46,6 +48,7 @@ class OutputPageTest extends MediaWikiTestCase {
 
        /**
         * Tests print requests
+        * @covers OutputPage::transformCssMedia
         */
        public function testPrintRequests() {
                $this->assertTransformCssMediaCase( array(
@@ -79,6 +82,7 @@ class OutputPageTest extends MediaWikiTestCase {
 
        /**
         * Tests screen requests, without either query parameter set
+        * @covers OutputPage::transformCssMedia
         */
        public function testScreenRequests() {
                $this->assertTransformCssMediaCase( array(
@@ -114,6 +118,7 @@ class OutputPageTest extends MediaWikiTestCase {
 
        /**
         * Tests handheld behavior
+        * @covers OutputPage::transformCssMedia
         */
        public function testHandheld() {
                $this->assertTransformCssMediaCase( array(
index adfb215..8fea8cc 100644 (file)
@@ -1,10 +1,10 @@
 <?php
+
 /**
  * Tests for the PathRouter parsing.
  *
- * @todo Add covers tags.
+ * @covers PathRouter
  */
-
 class PathRouterTest extends MediaWikiTestCase {
 
        /**
index 8a88191..8516a4c 100644 (file)
@@ -33,7 +33,7 @@ class TestSample extends MediaWikiLangTestCase {
         * "Agile Documentation" at
         * http://www.phpunit.de/manual/3.4/en/other-uses-for-tests.html
         */
-       function testTitleObjectStringConversion() {
+       public function testTitleObjectStringConversion() {
                $title = Title::newFromText( "text" );
                $this->assertInstanceOf( 'Title', $title, "Title creation" );
                $this->assertEquals( "Text", $title, "Automatic string conversion" );
@@ -98,7 +98,7 @@ class TestSample extends MediaWikiLangTestCase {
         * @expectedException MWException object
         * See http://www.phpunit.de/manual/3.4/en/appendixes.annotations.html#appendixes.annotations.expectedException
         */
-       function testTitleObjectFromObject() {
+       public function testTitleObjectFromObject() {
                $title = Title::newFromText( Title::newFromText( "test" ) );
                $this->assertEquals( "Test", $title->isLocal() );
        }
diff --git a/tests/phpunit/includes/StatusTest.php b/tests/phpunit/includes/StatusTest.php
new file mode 100644 (file)
index 0000000..332ac52
--- /dev/null
@@ -0,0 +1,192 @@
+<?php
+
+/**
+ * @author Adam Shorland
+ */
+class StatusTest extends MediaWikiTestCase {
+
+       public function testCanConstruct(){
+               new Status();
+               $this->assertTrue( true );
+       }
+
+       /**
+        * @dataProvider provideValues
+        * @covers Status::newGood
+        * @covers Status::getValue
+        * @covers Status::isGood
+        * @covers Status::isOK
+        */
+       public function testNewGood( $value = null ){
+               $status = Status::newGood( $value );
+               $this->assertTrue( $status->isGood() );
+               $this->assertTrue( $status->isOK() );
+               $this->assertEquals( $value, $status->getValue() );
+       }
+
+       public static function provideValues(){
+               return array(
+                       array(),
+                       array( 'foo' ),
+                       array( array( 'foo' => 'bar' ) ),
+                       array( new Exception() ),
+                       array( 1234 ),
+               );
+       }
+
+       /**
+        * @covers Status::newFatal
+        * @covers Status::isGood
+        * @covers Status::isOK
+        * @covers Status::getMessage
+        */
+       public function testNewFatalWithMessage() {
+               $message = $this->getMockBuilder( 'Message' )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+
+               $status = Status::newFatal( $message );
+               $this->assertFalse( $status->isGood() );
+               $this->assertFalse( $status->isOK() );
+               $this->assertEquals( $message, $status->getMessage() );
+       }
+
+       /**
+        * @covers Status::newFatal
+        * @covers Status::isGood
+        * @covers Status::isOK
+        * @covers Status::getMessage
+        */
+       public function testNewFatalWithString() {
+               $message = 'foo';
+               $status = Status::newFatal( $message );
+               $this->assertFalse( $status->isGood() );
+               $this->assertFalse( $status->isOK() );
+               $newMessage = $status->getMessage();
+               $this->assertEquals( $message, $newMessage->getKey() );
+       }
+
+       /**
+        * @dataProvider provideSetResult
+        * @covers Status::getValue
+        * @covers Status::isOK
+        */
+       public function testSetResult( $ok, $value = null ) {
+               $status = new Status();
+               $status->setResult( $ok, $value );
+               $this->assertEquals( $ok, $status->isOK() );
+               $this->assertEquals( $value, $status->getValue() );
+       }
+
+       public static function provideSetResult() {
+               return array(
+                       array( true ),
+                       array( false ),
+                       array( true, 'value' ),
+                       array( false, 'value' ),
+               );
+       }
+
+       /**
+        * @dataProvider provideMockMessageDetails
+        * @covers Status::warning
+        * @covers Status::getWarningsArray
+        */
+       public function testWarningWithMessage( $mockDetails ) {
+               $status = new Status();
+               $messages = $this->getMockMessages( $mockDetails );
+
+               foreach( $messages as $message ){
+                       $status->warning( $message );
+               }
+               $warnings = $status->getWarningsArray();
+
+               $this->assertEquals( count( $messages ), count( $warnings ) );
+               foreach( $messages as $key => $message ) {
+                       $expectedArray = array_merge( array( $message->getKey() ), $message->getParams() );
+                       $this->assertEquals( $warnings[$key], $expectedArray );
+               }
+       }
+
+       /**
+        * @dataProvider provideMockMessageDetails
+        * @covers Status::error
+        * @covers Status::getErrorsArray
+        */
+       public function testErrorWithMessage( $mockDetails ) {
+               $status = new Status();
+               $messages = $this->getMockMessages( $mockDetails );
+
+               foreach( $messages as $message ){
+                       $status->error( $message );
+               }
+               $errors = $status->getErrorsArray();
+
+               $this->assertEquals( count( $messages ), count( $errors ) );
+               foreach( $messages as $key => $message ) {
+                       $expectedArray = array_merge( array( $message->getKey() ), $message->getParams() );
+                       $this->assertEquals( $errors[$key], $expectedArray );
+               }
+       }
+
+       protected function getMockMessage( $key = 'key', $params = array() ) {
+               $message = $this->getMockBuilder( 'Message' )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+               $message->expects( $this->atLeastOnce() )
+                       ->method( 'getKey' )
+                       ->will( $this->returnValue( $key ) );
+               $message->expects( $this->atLeastOnce() )
+                       ->method( 'getParams' )
+                       ->will( $this->returnValue( $params ) );
+               return $message;
+       }
+
+       /**
+        * @param array $messageDetails eg. array( 'KEY' => array(/PARAMS/) )
+        * @return Message[]
+        */
+       protected function getMockMessages( $messageDetails ){
+               $messages = array();
+               foreach( $messageDetails as $key => $paramsArray ){
+                       $messages[] = $this->getMockMessage( $key, $paramsArray );
+               }
+               return $messages;
+       }
+
+       public static function provideMockMessageDetails(){
+               return array(
+                       array( array( 'key1' => array( 'foo' => 'bar' ) ) ),
+                       array( array( 'key1' => array( 'foo' => 'bar' ), 'key2' => array( 'foo2' => 'bar2' ) ) ),
+               );
+       }
+
+       /**
+        * @covers Status::merge
+        * @todo test merge with $overwriteValue true
+        */
+       public function testMerge(){
+               $status1 = new Status();
+               $status2 = new Status();
+               $message1 = $this->getMockMessage( 'warn1' );
+               $message2 = $this->getMockMessage( 'error2' );
+               $status1->warning( $message1 );
+               $status2->error( $message2 );
+
+               $status1->merge( $status2 );
+               $this->assertEquals( 2, count( $status1->getWarningsArray() ) + count( $status1->getErrorsArray() ) );
+       }
+
+       //todo test cleanParams
+       //todo test getWikiText
+       //todo test getMessage
+       //todo test getErrorMessage
+       //todo test getHTML
+       //todo test getErrorMessageArray
+       //todo test getStatusArray
+       //todo test getErrorsByType
+       //todo test hasMessage
+       //todo test replaceMessage
+       //todo test replaceMessage
+
+}
index b222812..89759e5 100644 (file)
@@ -9,7 +9,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         * @covers StringUtils::isUtf8
         * @dataProvider provideStringsForIsUtf8Check
         */
-       function testIsUtf8WithMbstring( $expected, $string ) {
+       public function testIsUtf8WithMbstring( $expected, $string ) {
                if ( !function_exists( 'mb_check_encoding' ) ) {
                        $this->markTestSkipped( 'Test requires the mbstring PHP extension' );
                }
@@ -27,7 +27,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         * @covers StringUtils::isUtf8
         * @dataProvider provideStringsForIsUtf8Check
         */
-       function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
+       public function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
                $this->assertEquals( $expected,
                        StringUtils::isUtf8( $string, /** disable mbstring: */true ),
                        'Testing string "' . $this->escaped( $string ) . '" with pure PHP implementation'
index 906aebd..fb63a56 100644 (file)
@@ -10,7 +10,7 @@ class TemplateCategoriesTest extends MediaWikiLangTestCase {
        /**
         * @covers Title::getParentCategories
         */
-       function testTemplateCategories() {
+       public function testTemplateCategories() {
                $title = Title::newFromText( "Categorized from template" );
                $page = WikiPage::factory( $title );
                $user = new User();
index f15c177..4a0a755 100644 (file)
@@ -2,7 +2,9 @@
 
 /**
  * @group Database
- * @todo covers tags
+ *
+ * @covers Title::getUserPermissionsErrors
+ * @covers Title::getUserPermissionsErrorsInternal
  */
 class TitlePermissionTest extends MediaWikiLangTestCase {
 
diff --git a/tests/phpunit/includes/UserMailerTest.php b/tests/phpunit/includes/UserMailerTest.php
new file mode 100644 (file)
index 0000000..278edfa
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+class UserMailerTest extends MediaWikiLangTestCase {
+
+       /**
+        * @covers UserMailer::quotedPrintable
+        */
+       public function testQuotedPrintable() {
+               $this->assertEquals(
+                       "=?UTF-8?Q?=C4=88u=20legebla=3F?=",
+                       UserMailer::quotedPrintable( "\xc4\x88u legebla?", "UTF-8" ) );
+       }
+
+}
\ No newline at end of file
index a600188..f8ed14b 100644 (file)
@@ -22,7 +22,7 @@ class WebRequestTest extends MediaWikiTestCase {
         * @dataProvider provideDetectServer
         * @covers WebRequest::detectServer
         */
-       function testDetectServer( $expected, $input, $description ) {
+       public function testDetectServer( $expected, $input, $description ) {
                $_SERVER = $input;
                $result = WebRequest::detectServer();
                $this->assertEquals( $expected, $result, $description );
@@ -106,7 +106,7 @@ class WebRequestTest extends MediaWikiTestCase {
         * @dataProvider provideGetIP
         * @covers WebRequest::getIP
         */
-       function testGetIP( $expected, $input, $squid, $xffList, $private, $description ) {
+       public function testGetIP( $expected, $input, $squid, $xffList, $private, $description ) {
                $_SERVER = $input;
                $this->setMwGlobals( array(
                        'wgSquidServersNoPurge' => $squid,
@@ -276,7 +276,7 @@ class WebRequestTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers WebRequest::getIP
         */
-       function testGetIpLackOfRemoteAddrThrowAnException() {
+       public function testGetIpLackOfRemoteAddrThrowAnException() {
                $request = new WebRequest();
                # Next call throw an exception about lacking an IP
                $request->getIP();
@@ -302,7 +302,7 @@ class WebRequestTest extends MediaWikiTestCase {
         * @dataProvider provideLanguageData
         * @covers WebRequest::getAcceptLang
         */
-       function testAcceptLang( $acceptLanguageHeader, $expectedLanguages, $description ) {
+       public function testAcceptLang( $acceptLanguageHeader, $expectedLanguages, $description ) {
                $_SERVER = array( 'HTTP_ACCEPT_LANGUAGE' => $acceptLanguageHeader );
                $request = new WebRequest();
                $this->assertSame( $request->getAcceptLang(), $expectedLanguages, $description );
index e0d786b..1258eb1 100644 (file)
@@ -1071,4 +1071,21 @@ more stuff
 
                $this->assertEquals( $expected, $text );
        }
+
+       /**
+        * @covers WikiPage::factory
+        */
+       public function testWikiPageFactory() {
+               $title = Title::makeTitle( NS_FILE, 'Someimage.png' );
+               $page = WikiPage::factory( $title );
+               $this->assertEquals( 'WikiFilePage', get_class( $page ) );
+
+               $title = Title::makeTitle( NS_CATEGORY, 'SomeCategory' );
+               $page = WikiPage::factory( $title );
+               $this->assertEquals( 'WikiCategoryPage', get_class( $page ) );
+
+               $title = Title::makeTitle( NS_MAIN, 'SomePage' );
+               $page = WikiPage::factory( $title );
+               $this->assertEquals( 'WikiPage', get_class( $page ) );
+       }
 }
index a0b33ee..8205029 100644 (file)
@@ -57,7 +57,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::element
         */
-       function testElementOpen() {
+       public function testElementOpen() {
                $this->assertEquals(
                        '<element>',
                        Xml::element( 'element', null, null ),
@@ -68,7 +68,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::element
         */
-       function testElementEmpty() {
+       public function testElementEmpty() {
                $this->assertEquals(
                        '<element />',
                        Xml::element( 'element', null, '' ),
@@ -79,7 +79,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::input
         */
-       function testElementInputCanHaveAValueOfZero() {
+       public function testElementInputCanHaveAValueOfZero() {
                $this->assertEquals(
                        '<input name="name" value="0" />',
                        Xml::input( 'name', false, 0 ),
@@ -90,7 +90,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::element
         */
-       function testElementEscaping() {
+       public function testElementEscaping() {
                $this->assertEquals(
                        '<element>hello &lt;there&gt; you &amp; you</element>',
                        Xml::element( 'element', null, 'hello <there> you & you' ),
@@ -110,7 +110,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::element
         */
-       function testElementAttributes() {
+       public function testElementAttributes() {
                $this->assertEquals(
                        '<element key="value" <>="&lt;&gt;">',
                        Xml::element( 'element', array( 'key' => 'value', '<>' => '<>' ), null ),
@@ -121,7 +121,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::openElement
         */
-       function testOpenElement() {
+       public function testOpenElement() {
                $this->assertEquals(
                        '<element k="v">',
                        Xml::openElement( 'element', array( 'k' => 'v' ) ),
@@ -132,7 +132,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::closeElement
         */
-       function testCloseElement() {
+       public function testCloseElement() {
                $this->assertEquals( '</element>', Xml::closeElement( 'element' ), 'closeElement() shortcut' );
        }
 
@@ -222,7 +222,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::textarea
         */
-       function testTextareaNoContent() {
+       public function testTextareaNoContent() {
                $this->assertEquals(
                        '<textarea name="name" id="name" cols="40" rows="5"></textarea>',
                        Xml::textarea( 'name', '' ),
@@ -233,7 +233,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::textarea
         */
-       function testTextareaAttribs() {
+       public function testTextareaAttribs() {
                $this->assertEquals(
                        '<textarea name="name" id="name" cols="20" rows="10">&lt;txt&gt;</textarea>',
                        Xml::textarea( 'name', '<txt>', 20, 10 ),
@@ -244,7 +244,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::label
         */
-       function testLabelCreation() {
+       public function testLabelCreation() {
                $this->assertEquals(
                        '<label for="id">name</label>',
                        Xml::label( 'name', 'id' ),
@@ -255,7 +255,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::label
         */
-       function testLabelAttributeCanOnlyBeClassOrTitle() {
+       public function testLabelAttributeCanOnlyBeClassOrTitle() {
                $this->assertEquals(
                        '<label for="id">name</label>',
                        Xml::label( 'name', 'id', array( 'generated' => true ) ),
@@ -287,7 +287,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::languageSelector
         */
-       function testLanguageSelector() {
+       public function testLanguageSelector() {
                $select = Xml::languageSelector( 'en', true, null,
                        array( 'id' => 'testlang' ), wfMessage( 'yourlanguage' ) );
                $this->assertEquals(
@@ -299,7 +299,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::escapeJsString
         */
-       function testEscapeJsStringSpecialChars() {
+       public function testEscapeJsStringSpecialChars() {
                $this->assertEquals(
                        '\\\\\r\n',
                        Xml::escapeJsString( "\\\r\n" ),
@@ -310,7 +310,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarBoolean() {
+       public function testEncodeJsVarBoolean() {
                $this->assertEquals(
                        'true',
                        Xml::encodeJsVar( true ),
@@ -321,7 +321,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarNull() {
+       public function testEncodeJsVarNull() {
                $this->assertEquals(
                        'null',
                        Xml::encodeJsVar( null ),
@@ -332,7 +332,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarArray() {
+       public function testEncodeJsVarArray() {
                $this->assertEquals(
                        '["a",1]',
                        Xml::encodeJsVar( array( 'a', 1 ) ),
@@ -348,7 +348,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarObject() {
+       public function testEncodeJsVarObject() {
                $this->assertEquals(
                        '{"a":"a","b":1}',
                        Xml::encodeJsVar( (object)array( 'a' => 'a', 'b' => 1 ) ),
@@ -359,7 +359,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarInt() {
+       public function testEncodeJsVarInt() {
                $this->assertEquals(
                        '123456',
                        Xml::encodeJsVar( 123456 ),
@@ -370,7 +370,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarFloat() {
+       public function testEncodeJsVarFloat() {
                $this->assertEquals(
                        '1.23456',
                        Xml::encodeJsVar( 1.23456 ),
@@ -381,7 +381,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarIntString() {
+       public function testEncodeJsVarIntString() {
                $this->assertEquals(
                        '"123456"',
                        Xml::encodeJsVar( '123456' ),
@@ -392,7 +392,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarFloatString() {
+       public function testEncodeJsVarFloatString() {
                $this->assertEquals(
                        '"1.23456"',
                        Xml::encodeJsVar( '1.23456' ),
index 7f436cd..2627a41 100644 (file)
@@ -29,21 +29,21 @@ class ZipDirectoryReaderTest extends MediaWikiTestCase {
                $this->assertTrue( $status->isOK(), $assertMessage );
        }
 
-       function testEmpty() {
+       public function testEmpty() {
                $this->readZipAssertSuccess( 'empty.zip', 'Empty zip' );
        }
 
-       function testMultiDisk0() {
+       public function testMultiDisk0() {
                $this->readZipAssertError( 'split.zip', 'zip-unsupported',
                        'Split zip error' );
        }
 
-       function testNoSignature() {
+       public function testNoSignature() {
                $this->readZipAssertError( 'nosig.zip', 'zip-wrong-format',
                        'No signature should give "wrong format" error' );
        }
 
-       function testSimple() {
+       public function testSimple() {
                $this->readZipAssertSuccess( 'class.zip', 'Simple ZIP' );
                $this->assertEquals( $this->entries, array( array(
                        'name' => 'Class.class',
@@ -52,33 +52,33 @@ class ZipDirectoryReaderTest extends MediaWikiTestCase {
                ) ) );
        }
 
-       function testBadCentralEntrySignature() {
+       public function testBadCentralEntrySignature() {
                $this->readZipAssertError( 'wrong-central-entry-sig.zip', 'zip-bad',
                        'Bad central entry error' );
        }
 
-       function testTrailingBytes() {
+       public function testTrailingBytes() {
                $this->readZipAssertError( 'trail.zip', 'zip-bad',
                        'Trailing bytes error' );
        }
 
-       function testWrongCDStart() {
+       public function testWrongCDStart() {
                $this->readZipAssertError( 'wrong-cd-start-disk.zip', 'zip-unsupported',
                        'Wrong CD start disk error' );
        }
 
 
-       function testCentralDirectoryGap() {
+       public function testCentralDirectoryGap() {
                $this->readZipAssertError( 'cd-gap.zip', 'zip-bad',
                        'CD gap error' );
        }
 
-       function testCentralDirectoryTruncated() {
+       public function testCentralDirectoryTruncated() {
                $this->readZipAssertError( 'cd-truncated.zip', 'zip-bad',
                        'CD truncated error (should hit unpack() overrun)' );
        }
 
-       function testLooksLikeZip64() {
+       public function testLooksLikeZip64() {
                $this->readZipAssertError( 'looks-like-zip64.zip', 'zip-unsupported',
                        'A file which looks like ZIP64 but isn\'t, should give error' );
        }
diff --git a/tests/phpunit/includes/api/ApiAccountCreationTest.php b/tests/phpunit/includes/api/ApiAccountCreationTest.php
deleted file mode 100644 (file)
index 50638ca..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-<?php
-
-/**
- * @group Database
- * @group API
- * @group medium
- */
-class ApiCreateAccountTest extends ApiTestCase {
-       function setUp() {
-               parent::setUp();
-               LoginForm::setCreateaccountToken();
-               $this->setMwGlobals( array( 'wgEnableEmail' => true ) );
-       }
-
-       /**
-        * Test the account creation API with a valid request. Also
-        * make sure the new account can log in and is valid.
-        *
-        * This test does multiple API requests so it might end up being
-        * a bit slow. Raise the default timeout.
-        * @group medium
-        */
-       function testValid() {
-               global $wgServer;
-
-               if ( !isset( $wgServer ) ) {
-                       $this->markTestIncomplete( 'This test needs $wgServer to be set in LocalSettings.php' );
-               }
-
-               $password = User::randomPassword();
-
-               $ret = $this->doApiRequest( array(
-                       'action' => 'createaccount',
-                       'name' => 'Apitestnew',
-                       'password' => $password,
-                       'email' => 'test@domain.test',
-                       'realname' => 'Test Name'
-               ) );
-
-               $result = $ret[0];
-               $this->assertNotInternalType( 'bool', $result );
-               $this->assertNotInternalType( 'null', $result['createaccount'] );
-
-               // Should first ask for token.
-               $a = $result['createaccount'];
-               $this->assertEquals( 'needtoken', $a['result'] );
-               $token = $a['token'];
-
-               // Finally create the account
-               $ret = $this->doApiRequest(
-                       array(
-                               'action' => 'createaccount',
-                               'name' => 'Apitestnew',
-                               'password' => $password,
-                               'token' => $token,
-                               'email' => 'test@domain.test',
-                               'realname' => 'Test Name'
-                       ),
-                       $ret[2]
-               );
-
-               $result = $ret[0];
-               $this->assertNotInternalType( 'bool', $result );
-               $this->assertEquals( 'success', $result['createaccount']['result'] );
-
-               // Try logging in with the new user.
-               $ret = $this->doApiRequest( array(
-                       'action' => 'login',
-                       'lgname' => 'Apitestnew',
-                       'lgpassword' => $password,
-               ) );
-
-               $result = $ret[0];
-               $this->assertNotInternalType( 'bool', $result );
-               $this->assertNotInternalType( 'null', $result['login'] );
-
-               $a = $result['login']['result'];
-               $this->assertEquals( 'NeedToken', $a );
-               $token = $result['login']['token'];
-
-               $ret = $this->doApiRequest(
-                       array(
-                               'action' => 'login',
-                               'lgtoken' => $token,
-                               'lgname' => 'Apitestnew',
-                               'lgpassword' => $password,
-                       ),
-                       $ret[2]
-               );
-
-               $result = $ret[0];
-
-               $this->assertNotInternalType( 'bool', $result );
-               $a = $result['login']['result'];
-
-               $this->assertEquals( 'Success', $a );
-
-               // log out to destroy the session
-               $ret = $this->doApiRequest(
-                       array(
-                               'action' => 'logout',
-                       ),
-                       $ret[2]
-               );
-               $this->assertEquals( array(), $ret[0] );
-       }
-
-       /**
-        * Make sure requests with no names are invalid.
-        * @expectedException UsageException
-        */
-       function testNoName() {
-               $this->doApiRequest( array(
-                       'action' => 'createaccount',
-                       'token' => LoginForm::getCreateaccountToken(),
-                       'password' => 'password',
-               ) );
-       }
-
-       /**
-        * Make sure requests with no password are invalid.
-        * @expectedException UsageException
-        */
-       function testNoPassword() {
-               $this->doApiRequest( array(
-                       'action' => 'createaccount',
-                       'name' => 'testName',
-                       'token' => LoginForm::getCreateaccountToken(),
-               ) );
-       }
-
-       /**
-        * Make sure requests with existing users are invalid.
-        * @expectedException UsageException
-        */
-       function testExistingUser() {
-               $this->doApiRequest( array(
-                       'action' => 'createaccount',
-                       'name' => 'Apitestsysop',
-                       'token' => LoginForm::getCreateaccountToken(),
-                       'password' => 'password',
-                       'email' => 'test@domain.test',
-               ) );
-       }
-
-       /**
-        * Make sure requests with invalid emails are invalid.
-        * @expectedException UsageException
-        */
-       function testInvalidEmail() {
-               $this->doApiRequest( array(
-                       'action' => 'createaccount',
-                       'name' => 'Test User',
-                       'token' => LoginForm::getCreateaccountToken(),
-                       'password' => 'password',
-                       'email' => 'invalid',
-               ) );
-       }
-}
index d0eb18a..d98eec6 100644 (file)
@@ -4,6 +4,8 @@
  * @group API
  * @group Database
  * @group medium
+ *
+ * @covers ApiBlock
  */
 class ApiBlockTest extends ApiTestCase {
        protected function setUp() {
@@ -11,7 +13,7 @@ class ApiBlockTest extends ApiTestCase {
                $this->doLogin();
        }
 
-       function getTokens() {
+       protected function getTokens() {
                return $this->getTokenList( self::$users['sysop'] );
        }
 
@@ -34,7 +36,7 @@ class ApiBlockTest extends ApiTestCase {
         * Which made the Block/Unblock API to actually verify the token
         * previously always considered valid (bug 34212).
         */
-       function testMakeNormalBlock() {
+       public function testMakeNormalBlock() {
                $tokens = $this->getTokens();
 
                $user = User::newFromName( 'UTApiBlockee' );
@@ -63,17 +65,13 @@ class ApiBlockTest extends ApiTestCase {
        }
 
        /**
-        * Attempting to block without a token should give a UsageException with
-        * error message:
-        *   "The token parameter must be set"
-        *
-        * @dataProvider provideBlockUnblockAction
         * @expectedException UsageException
+        * @expectedExceptionMessage The token parameter must be set
         */
-       function testBlockingActionWithNoToken( $action ) {
+       public function testBlockingActionWithNoToken( ) {
                $this->doApiRequest(
                        array(
-                               'action' => $action,
+                               'action' => 'block',
                                'user' => 'UTApiBlockee',
                                'reason' => 'Some reason',
                        ),
@@ -82,14 +80,4 @@ class ApiBlockTest extends ApiTestCase {
                        self::$users['sysop']->user
                );
        }
-
-       /**
-        * Just provide the 'block' and 'unblock' action to test both API calls
-        */
-       public static function provideBlockUnblockAction() {
-               return array(
-                       array( 'block' ),
-                       array( 'unblock' ),
-               );
-       }
 }
diff --git a/tests/phpunit/includes/api/ApiCreateAccountTest.php b/tests/phpunit/includes/api/ApiCreateAccountTest.php
new file mode 100644 (file)
index 0000000..a723245
--- /dev/null
@@ -0,0 +1,161 @@
+<?php
+
+/**
+ * @group Database
+ * @group API
+ * @group medium
+ *
+ * @covers ApiCreateAccount
+ */
+class ApiCreateAccountTest extends ApiTestCase {
+       protected function setUp() {
+               parent::setUp();
+               LoginForm::setCreateaccountToken();
+               $this->setMwGlobals( array( 'wgEnableEmail' => true ) );
+       }
+
+       /**
+        * Test the account creation API with a valid request. Also
+        * make sure the new account can log in and is valid.
+        *
+        * This test does multiple API requests so it might end up being
+        * a bit slow. Raise the default timeout.
+        * @group medium
+        */
+       public function testValid() {
+               global $wgServer;
+
+               if ( !isset( $wgServer ) ) {
+                       $this->markTestIncomplete( 'This test needs $wgServer to be set in LocalSettings.php' );
+               }
+
+               $password = User::randomPassword();
+
+               $ret = $this->doApiRequest( array(
+                       'action' => 'createaccount',
+                       'name' => 'Apitestnew',
+                       'password' => $password,
+                       'email' => 'test@domain.test',
+                       'realname' => 'Test Name'
+               ) );
+
+               $result = $ret[0];
+               $this->assertNotInternalType( 'bool', $result );
+               $this->assertNotInternalType( 'null', $result['createaccount'] );
+
+               // Should first ask for token.
+               $a = $result['createaccount'];
+               $this->assertEquals( 'needtoken', $a['result'] );
+               $token = $a['token'];
+
+               // Finally create the account
+               $ret = $this->doApiRequest(
+                       array(
+                               'action' => 'createaccount',
+                               'name' => 'Apitestnew',
+                               'password' => $password,
+                               'token' => $token,
+                               'email' => 'test@domain.test',
+                               'realname' => 'Test Name'
+                       ),
+                       $ret[2]
+               );
+
+               $result = $ret[0];
+               $this->assertNotInternalType( 'bool', $result );
+               $this->assertEquals( 'success', $result['createaccount']['result'] );
+
+               // Try logging in with the new user.
+               $ret = $this->doApiRequest( array(
+                       'action' => 'login',
+                       'lgname' => 'Apitestnew',
+                       'lgpassword' => $password,
+               ) );
+
+               $result = $ret[0];
+               $this->assertNotInternalType( 'bool', $result );
+               $this->assertNotInternalType( 'null', $result['login'] );
+
+               $a = $result['login']['result'];
+               $this->assertEquals( 'NeedToken', $a );
+               $token = $result['login']['token'];
+
+               $ret = $this->doApiRequest(
+                       array(
+                               'action' => 'login',
+                               'lgtoken' => $token,
+                               'lgname' => 'Apitestnew',
+                               'lgpassword' => $password,
+                       ),
+                       $ret[2]
+               );
+
+               $result = $ret[0];
+
+               $this->assertNotInternalType( 'bool', $result );
+               $a = $result['login']['result'];
+
+               $this->assertEquals( 'Success', $a );
+
+               // log out to destroy the session
+               $ret = $this->doApiRequest(
+                       array(
+                               'action' => 'logout',
+                       ),
+                       $ret[2]
+               );
+               $this->assertEquals( array(), $ret[0] );
+       }
+
+       /**
+        * Make sure requests with no names are invalid.
+        * @expectedException UsageException
+        */
+       public function testNoName() {
+               $this->doApiRequest( array(
+                       'action' => 'createaccount',
+                       'token' => LoginForm::getCreateaccountToken(),
+                       'password' => 'password',
+               ) );
+       }
+
+       /**
+        * Make sure requests with no password are invalid.
+        * @expectedException UsageException
+        */
+       public function testNoPassword() {
+               $this->doApiRequest( array(
+                       'action' => 'createaccount',
+                       'name' => 'testName',
+                       'token' => LoginForm::getCreateaccountToken(),
+               ) );
+       }
+
+       /**
+        * Make sure requests with existing users are invalid.
+        * @expectedException UsageException
+        */
+       public function testExistingUser() {
+               $this->doApiRequest( array(
+                       'action' => 'createaccount',
+                       'name' => 'Apitestsysop',
+                       'token' => LoginForm::getCreateaccountToken(),
+                       'password' => 'password',
+                       'email' => 'test@domain.test',
+               ) );
+       }
+
+       /**
+        * Make sure requests with invalid emails are invalid.
+        * @expectedException UsageException
+        */
+       public function testInvalidEmail() {
+               $this->doApiRequest( array(
+                       'action' => 'createaccount',
+                       'name' => 'Test User',
+                       'token' => LoginForm::getCreateaccountToken(),
+                       'password' => 'password',
+                       'email' => 'invalid',
+               ) );
+       }
+}
index 3926e85..7521dcf 100644 (file)
@@ -8,6 +8,8 @@
  * @group API
  * @group Database
  * @group medium
+ *
+ * @covers ApiEditPage
  */
 class ApiEditPageTest extends ApiTestCase {
 
@@ -43,7 +45,7 @@ class ApiEditPageTest extends ApiTestCase {
                parent::tearDown();
        }
 
-       function testEdit() {
+       public function testEdit() {
                $name = 'Help:ApiEditPageTest_testEdit'; // assume Help namespace to default to wikitext
 
                // -- test new page --------------------------------------------
@@ -97,7 +99,7 @@ class ApiEditPageTest extends ApiTestCase {
                );
        }
 
-       function testNonTextEdit() {
+       public function testNonTextEdit() {
                $name = 'Dummy:ApiEditPageTest_testNonTextEdit';
                $data = serialize( 'some bla bla text' );
 
@@ -150,7 +152,7 @@ class ApiEditPageTest extends ApiTestCase {
        /**
         * @dataProvider provideEditAppend
         */
-       function testEditAppend( $text, $op, $append, $expected ) {
+       public function testEditAppend( $text, $op, $append, $expected ) {
                static $count = 0;
                $count++;
 
@@ -196,7 +198,7 @@ class ApiEditPageTest extends ApiTestCase {
        /**
         * Test editing of sections
         */
-       function testEditSection() {
+       public function testEditSection() {
                $name = 'Help:ApiEditPageTest_testEditSection';
                $page = WikiPage::factory( Title::newFromText( $name ) );
                $text = "==section 1==\ncontent 1\n==section 2==\ncontent2";
@@ -233,7 +235,7 @@ class ApiEditPageTest extends ApiTestCase {
         * page that doesn't exist (bug 52830) and one that
         * does exist
         */
-       function testEditNewSection() {
+       public function testEditNewSection() {
                $name = 'Help:ApiEditPageTest_testEditNewSection';
 
                // Test on a page that does not already exist
@@ -266,7 +268,7 @@ class ApiEditPageTest extends ApiTestCase {
                $this->assertEquals( $text, "== header ==\n\ntest\n\n== header ==\n\ntest" );
        }
 
-       function testEditConflict() {
+       public function testEditConflict() {
                static $count = 0;
                $count++;
 
@@ -302,7 +304,7 @@ class ApiEditPageTest extends ApiTestCase {
                }
        }
 
-       function testEditConflict_redirect() {
+       public function testEditConflict_redirect() {
                static $count = 0;
                $count++;
 
@@ -358,7 +360,7 @@ class ApiEditPageTest extends ApiTestCase {
                }
        }
 
-       function testEditConflict_bug41990() {
+       public function testEditConflict_bug41990() {
                static $count = 0;
                $count++;
 
index ad1e73a..3168f32 100644 (file)
@@ -4,10 +4,18 @@
  * @group API
  * @group Database
  * @group medium
+ *
+ * @covers ApiOptions
  */
 class ApiOptionsTest extends MediaWikiLangTestCase {
 
-       private $mTested, $mUserMock, $mContext, $mSession;
+       /** @var PHPUnit_Framework_MockObject_MockObject */
+       private $mUserMock ;
+       /** @var ApiOptions */
+       private $mTested;
+       private $mSession;
+       /** @var DerivativeContext */
+       private $mContext;
 
        private $mOldGetPreferencesHooks = false;
 
index b408875..d303d4b 100644 (file)
@@ -4,6 +4,8 @@
  * @group API
  * @group Database
  * @group medium
+ *
+ * @covers ApiParse
  */
 class ApiParseTest extends ApiTestCase {
 
@@ -12,7 +14,7 @@ class ApiParseTest extends ApiTestCase {
                $this->doLogin();
        }
 
-       function testParseNonexistentPage() {
+       public function testParseNonexistentPage() {
                $somePage = mt_rand();
 
                try {
index 881eb3f..d25a4c1 100644 (file)
@@ -4,6 +4,8 @@
  * @group API
  * @group Database
  * @group medium
+ *
+ * @covers ApiPurge
  */
 class ApiPurgeTest extends ApiTestCase {
 
@@ -15,7 +17,7 @@ class ApiPurgeTest extends ApiTestCase {
        /**
         * @group Broken
         */
-       function testPurgeMainPage() {
+       public function testPurgeMainPage() {
                if ( !Title::newFromText( 'UTPage' )->exists() ) {
                        $this->markTestIncomplete( "The article [[UTPage]] does not exist" );
                }
index 5106be5..472f8c4 100644 (file)
@@ -7,7 +7,7 @@
  */
 class ApiTest extends ApiTestCase {
 
-       function testRequireOnlyOneParameterDefault() {
+       public function testRequireOnlyOneParameterDefault() {
                $mock = new MockApi();
 
                $this->assertEquals(
@@ -18,7 +18,7 @@ class ApiTest extends ApiTestCase {
        /**
         * @expectedException UsageException
         */
-       function testRequireOnlyOneParameterZero() {
+       public function testRequireOnlyOneParameterZero() {
                $mock = new MockApi();
 
                $this->assertEquals(
@@ -29,7 +29,7 @@ class ApiTest extends ApiTestCase {
        /**
         * @expectedException UsageException
         */
-       function testRequireOnlyOneParameterTrue() {
+       public function testRequireOnlyOneParameterTrue() {
                $mock = new MockApi();
 
                $this->assertEquals(
@@ -43,7 +43,7 @@ class ApiTest extends ApiTestCase {
         *
         * @expectedException UsageException
         */
-       function testApi() {
+       public function testApi() {
                $api = new ApiMain(
                        new FauxRequest( array( 'action' => 'help', 'format' => 'xml' ) )
                );
@@ -61,14 +61,14 @@ class ApiTest extends ApiTestCase {
        /**
         * Test result of attempted login with an empty username
         */
-       function testApiLoginNoName() {
+       public function testApiLoginNoName() {
                $data = $this->doApiRequest( array( 'action' => 'login',
                        'lgname' => '', 'lgpassword' => self::$users['sysop']->password,
                ) );
                $this->assertEquals( 'NoName', $data[0]['login']['result'] );
        }
 
-       function testApiLoginBadPass() {
+       public function testApiLoginBadPass() {
                global $wgServer;
 
                $user = self::$users['sysop'];
@@ -109,7 +109,7 @@ class ApiTest extends ApiTestCase {
                $this->assertEquals( "WrongPass", $a );
        }
 
-       function testApiLoginGoodPass() {
+       public function testApiLoginGoodPass() {
                global $wgServer;
 
                if ( !isset( $wgServer ) ) {
@@ -155,7 +155,7 @@ class ApiTest extends ApiTestCase {
        /**
         * @group Broken
         */
-       function testApiGotCookie() {
+       public function testApiGotCookie() {
                $this->markTestIncomplete( "The server can't do external HTTP requests, and the internal one won't give cookies" );
 
                global $wgServer, $wgScriptPath;
@@ -201,7 +201,7 @@ class ApiTest extends ApiTestCase {
                return $cj;
        }
 
-       function testRunLogin() {
+       public function testRunLogin() {
                $sysopUser = self::$users['sysop'];
                $data = $this->doApiRequest( array(
                        'action' => 'login',
@@ -227,7 +227,7 @@ class ApiTest extends ApiTestCase {
                return $data;
        }
 
-       function testGettingToken() {
+       public function testGettingToken() {
                foreach ( self::$users as $user ) {
                        $this->runTokenTest( $user );
                }
index 94ef9c6..ad297dd 100644 (file)
@@ -117,7 +117,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
         * @param $params Array: key-value API params
         * @param $session Array|null: session array
         * @param $user User|null A User object for the context
-        * @return result of the API call
+        * @return mixed result of the API call
         * @throws Exception in case wsToken is not set in the session
         */
        protected function doApiRequestWithToken( array $params, array $session = null, User $user = null ) {
@@ -188,66 +188,3 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
                );
        }
 }
-
-class UserWrapper {
-       public $userName;
-       public $password;
-       public $user;
-
-       public function __construct( $userName, $password, $group = '' ) {
-               $this->userName = $userName;
-               $this->password = $password;
-
-               $this->user = User::newFromName( $this->userName );
-               if ( !$this->user->getID() ) {
-                       $this->user = User::createNew( $this->userName, array(
-                               "email" => "test@example.com",
-                               "real_name" => "Test User" ) );
-               }
-               $this->user->setPassword( $this->password );
-
-               if ( $group !== '' ) {
-                       $this->user->addGroup( $group );
-               }
-               $this->user->saveSettings();
-       }
-}
-
-class MockApi extends ApiBase {
-       public function execute() {
-       }
-
-       public function getVersion() {
-       }
-
-       public function __construct() {
-       }
-
-       public function getAllowedParams() {
-               return array(
-                       'filename' => null,
-                       'enablechunks' => false,
-                       'sessionkey' => null,
-               );
-       }
-}
-
-class ApiTestContext extends RequestContext {
-
-       /**
-        * Returns a DerivativeContext with the request variables in place
-        *
-        * @param $request WebRequest request object including parameters and session
-        * @param $user User or null
-        * @return DerivativeContext
-        */
-       public function newTestContext( WebRequest $request, User $user = null ) {
-               $context = new DerivativeContext( $this );
-               $context->setRequest( $request );
-               if ( $user !== null ) {
-                       $context->setUser( $user );
-               }
-
-               return $context;
-       }
-}
diff --git a/tests/phpunit/includes/api/ApiTestContext.php b/tests/phpunit/includes/api/ApiTestContext.php
new file mode 100644 (file)
index 0000000..43637c2
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+
+class ApiTestContext extends RequestContext {
+
+       /**
+        * Returns a DerivativeContext with the request variables in place
+        *
+        * @param $request WebRequest request object including parameters and session
+        * @param $user User or null
+        * @return DerivativeContext
+        */
+       public function newTestContext( WebRequest $request, User $user = null ) {
+               $context = new DerivativeContext( $this );
+               $context->setRequest( $request );
+               if ( $user !== null ) {
+                       $context->setUser( $user );
+               }
+
+               return $context;
+       }
+}
\ No newline at end of file
diff --git a/tests/phpunit/includes/api/ApiUnblockTest.php b/tests/phpunit/includes/api/ApiUnblockTest.php
new file mode 100644 (file)
index 0000000..2c2370a
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * @group API
+ * @group Database
+ * @group medium
+ *
+ * @covers ApiUnblock
+ */
+class ApiUnblockTest extends ApiTestCase {
+       protected function setUp() {
+               parent::setUp();
+               $this->doLogin();
+       }
+
+       /**
+        * @expectedException UsageException
+        */
+       public function testWithNoToken( ) {
+               $this->doApiRequest(
+                       array(
+                               'action' => 'unblock',
+                               'user' => 'UTApiBlockee',
+                               'reason' => 'Some reason',
+                       ),
+                       null,
+                       false,
+                       self::$users['sysop']->user
+               );
+       }
+}
index ae3a5e9..1540af5 100644 (file)
@@ -31,7 +31,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
         * Testing login
         * XXX this is a funny way of getting session context
         */
-       function testLogin() {
+       public function testLogin() {
                $user = self::$users['uploader'];
 
                $params = array(
index 8253989..028ea9f 100644 (file)
@@ -18,7 +18,7 @@ class ApiWatchTest extends ApiTestCase {
 
        /**
         */
-       function testWatchEdit() {
+       public function testWatchEdit() {
                $tokens = $this->getTokens();
 
                $data = $this->doApiRequest( array(
@@ -37,7 +37,7 @@ class ApiWatchTest extends ApiTestCase {
        /**
         * @depends testWatchEdit
         */
-       function testWatchClear() {
+       public function testWatchClear() {
                $tokens = $this->getTokens();
 
                $data = $this->doApiRequest( array(
@@ -67,7 +67,7 @@ class ApiWatchTest extends ApiTestCase {
 
        /**
         */
-       function testWatchProtect() {
+       public function testWatchProtect() {
                $tokens = $this->getTokens();
 
                $data = $this->doApiRequest( array(
@@ -85,7 +85,7 @@ class ApiWatchTest extends ApiTestCase {
 
        /**
         */
-       function testGetRollbackToken() {
+       public function testGetRollbackToken() {
                $this->getTokens();
 
                if ( !Title::newFromText( 'Help:UTPage' )->exists() ) {
@@ -121,7 +121,7 @@ class ApiWatchTest extends ApiTestCase {
         *
         * @depends testGetRollbackToken
         */
-       function testWatchRollback( $data ) {
+       public function testWatchRollback( $data ) {
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
diff --git a/tests/phpunit/includes/api/MockApi.php b/tests/phpunit/includes/api/MockApi.php
new file mode 100644 (file)
index 0000000..3686048
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+class MockApi extends ApiBase {
+       public function execute() {
+       }
+
+       public function getVersion() {
+       }
+
+       public function __construct() {
+       }
+
+       public function getAllowedParams() {
+               return array(
+                       'filename' => null,
+                       'enablechunks' => false,
+                       'sessionkey' => null,
+               );
+       }
+}
\ No newline at end of file
index d9be85e..a1fc2c2 100644 (file)
@@ -6,6 +6,7 @@
  * @group API
  */
 class PrefixUniquenessTest extends MediaWikiTestCase {
+
        public function testPrefixes() {
                $main = new ApiMain( new FauxRequest() );
                $query = new ApiQuery( $main, 'foo', 'bar' );
@@ -13,6 +14,7 @@ class PrefixUniquenessTest extends MediaWikiTestCase {
                $prefixes = array();
 
                foreach ( $modules as $name => $class ) {
+                       /** @var ApiMain $module */
                        $module = new $class( $main, $name );
                        $prefix = $module->getModulePrefix();
                        if ( isset( $prefixes[$prefix] ) ) {
diff --git a/tests/phpunit/includes/api/UserWrapper.php b/tests/phpunit/includes/api/UserWrapper.php
new file mode 100644 (file)
index 0000000..3262e6c
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+class UserWrapper {
+       public $userName;
+       public $password;
+       public $user;
+
+       public function __construct( $userName, $password, $group = '' ) {
+               $this->userName = $userName;
+               $this->password = $password;
+
+               $this->user = User::newFromName( $this->userName );
+               if ( !$this->user->getID() ) {
+                       $this->user = User::createNew( $this->userName, array(
+                               "email" => "test@example.com",
+                               "real_name" => "Test User" ) );
+               }
+               $this->user->setPassword( $this->password );
+
+               if ( $group !== '' ) {
+                       $this->user->addGroup( $group );
+               }
+               $this->user->saveSettings();
+       }
+}
\ No newline at end of file
diff --git a/tests/phpunit/includes/api/format/ApiFormatJsonTest.php b/tests/phpunit/includes/api/format/ApiFormatJsonTest.php
new file mode 100644 (file)
index 0000000..c71faec
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * @group API
+ * @group Database
+ * @group medium
+ * @covers ApiFormatJson
+ */
+class ApiFormatJsonTest extends ApiFormatTestBase {
+
+       public function testValidSyntax( ) {
+               $data = $this->apiRequest( 'json', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
+
+               $this->assertInternalType( 'array', json_decode( $data, true ) );
+               $this->assertGreaterThan( 0, count( (array)$data ) );
+       }
+}
index 802a0e1..759dfc7 100644 (file)
@@ -4,11 +4,11 @@
  * @group API
  * @group Database
  * @group medium
+ * @covers ApiFormatPhp
  */
 class ApiFormatPhpTest extends ApiFormatTestBase {
 
-       function testValidPhpSyntax() {
-
+       public function testValidyntax( ) {
                $data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
 
                $this->assertInternalType( 'array', unserialize( $data ) );
index 153f2cf..24d8cb8 100644 (file)
@@ -1,9 +1,18 @@
 <?php
 
 abstract class ApiFormatTestBase extends ApiTestCase {
+
+       /**
+        * @param string $format
+        * @param array $params
+        * @param $data
+        *
+        * @return string
+        */
        protected function apiRequest( $format, $params, $data = null ) {
                $data = parent::doApiRequest( $params, $data, true );
 
+               /** @var ApiMain $module */
                $module = $data[3];
 
                $printer = $module->createPrinterByName( $format );
@@ -19,4 +28,5 @@ abstract class ApiFormatTestBase extends ApiTestCase {
 
                return $out;
        }
+
 }
diff --git a/tests/phpunit/includes/api/format/ApiFormatWddxTest.php b/tests/phpunit/includes/api/format/ApiFormatWddxTest.php
new file mode 100644 (file)
index 0000000..2cf6dca
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * @group API
+ * @group Database
+ * @group medium
+ * @covers ApiFormatWddx
+ */
+class ApiFormatWddxTest extends ApiFormatTestBase {
+
+       public function testValidSyntax( ) {
+               $data = $this->apiRequest( 'wddx', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
+
+               $this->assertInternalType( 'array', wddx_deserialize( $data ) );
+               $this->assertGreaterThan( 0, count( (array)$data ) );
+       }
+}
index 1a2aa83..a68c830 100644 (file)
 
 require_once 'ApiQueryTestBase.php';
 
-/** These tests validate basic functionality of the api query module
+/**
+ * These tests validate basic functionality of the api query module
  *
  * @group API
  * @group Database
  * @group medium
+ * @covers ApiQuery
  */
 class ApiQueryBasicTest extends ApiQueryTestBase {
        /**
index 4d5ddba..2116cd3 100644 (file)
@@ -24,6 +24,7 @@ require_once 'ApiQueryContinueTestBase.php';
  * @group API
  * @group Database
  * @group medium
+ * @covers ApiQuery
  */
 class ApiQueryContinue2Test extends ApiQueryContinueTestBase {
        /**
index f494e9c..7797522 100644 (file)
@@ -28,6 +28,7 @@ require_once 'ApiQueryContinueTestBase.php';
  * @group API
  * @group Database
  * @group medium
+ * @covers ApiQuery
  */
 class ApiQueryContinueTest extends ApiQueryContinueTestBase {
        /**
index fbb1e64..3b55b13 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- *
- *
  * Created on Jan 1, 2013
  *
  * Copyright © 2013 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
index 7f5fe91..74ceff9 100644 (file)
@@ -4,13 +4,14 @@
  * @group API
  * @group Database
  * @group medium
+ * @covers ApiQueryRevisions
  */
 class ApiQueryRevisionsTest extends ApiTestCase {
 
        /**
         * @group medium
         */
-       function testContentComesWithContentModelAndFormat() {
+       public function testContentComesWithContentModelAndFormat() {
                $pageName = 'Help:' . __METHOD__;
                $title = Title::newFromText( $pageName );
                $page = WikiPage::factory( $title );
index bc01ec2..2ec5fe3 100644 (file)
@@ -4,6 +4,7 @@
  * @group API
  * @group Database
  * @group medium
+ * @covers ApiQuery
  */
 class ApiQueryTest extends ApiTestCase {
 
@@ -12,7 +13,7 @@ class ApiQueryTest extends ApiTestCase {
                $this->doLogin();
        }
 
-       function testTitlesGetNormalized() {
+       public function testTitlesGetNormalized() {
 
                global $wgMetaNamespace;
 
@@ -43,7 +44,7 @@ class ApiQueryTest extends ApiTestCase {
                );
        }
 
-       function testTitlesAreRejectedIfInvalid() {
+       public function testTitlesAreRejectedIfInvalid() {
                $title = false;
                while ( !$title || Title::newFromText( $title )->exists() ) {
                        $title = md5( mt_rand( 0, 10000 ) + rand( 0, 999000 ) );
index 8ee8ea9..9cfab41 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- *
- *
  * Created on Feb 10, 2013
  *
  * Copyright © 2013 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
index 2ac2942..ce2db5d 100644 (file)
@@ -48,7 +48,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
         * @dataProvider provideUserGenders
         * @covers GenderCache::getGenderOf
         */
-       function testUserName( $username, $expectedGender ) {
+       public function testUserName( $username, $expectedGender ) {
                $genderCache = GenderCache::singleton();
                $gender = $genderCache->getGenderOf( $username );
                $this->assertEquals( $gender, $expectedGender, "GenderCache normal" );
@@ -60,7 +60,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
         * @dataProvider provideUserGenders
         * @covers GenderCache::getGenderOf
         */
-       function testUserObjects( $username, $expectedGender ) {
+       public function testUserObjects( $username, $expectedGender ) {
                $genderCache = GenderCache::singleton();
                $user = User::newFromName( $username );
                $gender = $genderCache->getGenderOf( $user );
@@ -86,7 +86,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
         * @dataProvider provideStripSubpages
         * @covers GenderCache::getGenderOf
         */
-       function testStripSubpages( $pageWithSubpage, $expectedGender ) {
+       public function testStripSubpages( $pageWithSubpage, $expectedGender ) {
                $genderCache = GenderCache::singleton();
                $gender = $genderCache->getGenderOf( $pageWithSubpage );
                $this->assertEquals( $gender, $expectedGender, "GenderCache must strip of subpages" );
index 3559f15..803acf7 100644 (file)
@@ -84,7 +84,7 @@ class MessageCacheTest extends MediaWikiLangTestCase {
         *
         * @dataProvider provideMessagesForFallback
         */
-       function testMessageFallbacks( $message, $lang, $expectedContent ) {
+       public function testMessageFallbacks( $message, $lang, $expectedContent ) {
                $result = MessageCache::singleton()->get( $message, true, $lang );
                $this->assertEquals( $expectedContent, $result, "Message fallback failed." );
        }
@@ -112,7 +112,7 @@ class MessageCacheTest extends MediaWikiLangTestCase {
         *
         * @dataProvider provideMessagesForFullKeys
         */
-       function testFullKeyBehaviour( $message, $lang, $expectedContent ) {
+       public function testFullKeyBehaviour( $message, $lang, $expectedContent ) {
                $result = MessageCache::singleton()->get( $message, true, $lang, true );
                $this->assertEquals( $expectedContent, $result, "Full key message fallback failed." );
        }
index 1c81ea7..d3793d8 100644 (file)
@@ -59,7 +59,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
        /**
         * Highlight diff between assertEquals and assertNotSame
         */
-       function testPhpUnitArrayEquality() {
+       public function testPhpUnitArrayEquality() {
                $one = array( 'A' => 1, 'B' => 2 );
                $two = array( 'B' => 2, 'A' => 1 );
                $this->assertEquals( $one, $two ); // ==
@@ -70,7 +70,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * @dataProvider provideInvalidConstructorArg
         * @expectedException MWException
         */
-       function testConstructorGivenInvalidValue( $maxSize ) {
+       public function testConstructorGivenInvalidValue( $maxSize ) {
                new ProcessCacheLRUTestable( $maxSize );
        }
 
@@ -88,7 +88,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                );
        }
 
-       function testAddAndGetAKey() {
+       public function testAddAndGetAKey() {
                $oneCache = new ProcessCacheLRUTestable( 1 );
                $this->assertCacheEmpty( $oneCache );
 
@@ -99,7 +99,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                $this->assertEquals( 'value1', $oneCache->get( 'cache-key', 'prop1' ) );
        }
 
-       function testDeleteOldKey() {
+       public function testDeleteOldKey() {
                $oneCache = new ProcessCacheLRUTestable( 1 );
                $this->assertCacheEmpty( $oneCache );
 
@@ -117,7 +117,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * @param $cacheMaxEntries Maximum entry the created cache will hold
         * @param $entryToFill Number of entries to insert in the created cache.
         */
-       function testFillingCache( $cacheMaxEntries, $entryToFill, $msg = '' ) {
+       public function testFillingCache( $cacheMaxEntries, $entryToFill, $msg = '' ) {
                $cache = new ProcessCacheLRUTestable( $cacheMaxEntries );
                $this->fillCache( $cache, $entryToFill );
 
@@ -145,7 +145,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * Create a cache with only one remaining entry then update
         * the first inserted entry. Should bump it to the top.
         */
-       function testReplaceExistingKeyShouldBumpEntryToTop() {
+       public function testReplaceExistingKeyShouldBumpEntryToTop() {
                $maxEntries = 3;
 
                $cache = new ProcessCacheLRUTestable( $maxEntries );
@@ -164,7 +164,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                );
        }
 
-       function testRecentlyAccessedKeyStickIn() {
+       public function testRecentlyAccessedKeyStickIn() {
                $cache = new ProcessCacheLRUTestable( 2 );
                $cache->set( 'first', 'prop1', 'value1' );
                $cache->set( 'second', 'prop2', 'value2' );
@@ -183,7 +183,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * Given a cache having 1,2,3 as key, updating 2 should bump 2 to
         * the top of the queue with the new value: 1,3,2* (* = updated).
         */
-       function testReplaceExistingKeyInAFullCacheShouldBumpToTop() {
+       public function testReplaceExistingKeyInAFullCacheShouldBumpToTop() {
                $maxEntries = 3;
 
                $cache = new ProcessCacheLRUTestable( $maxEntries );
@@ -204,7 +204,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                );
        }
 
-       function testBumpExistingKeyToTop() {
+       public function testBumpExistingKeyToTop() {
                $cache = new ProcessCacheLRUTestable( 3 );
                $this->fillCache( $cache, 3 );
 
index 7d7a2bd..134f856 100644 (file)
@@ -60,7 +60,7 @@ class DatabaseMysqlBaseTest extends MediaWikiTestCase {
         * @dataProvider provideDiapers
         * @covers DatabaseMysqlBase::addIdentifierQuotes
         */
-       function testAddIdentifierQuotes( $expected, $in ) {
+       public function testAddIdentifierQuotes( $expected, $in ) {
                $db = new FakeDatabaseMysqlBase();
                $quoted = $db->addIdentifierQuotes( $in );
                $this->assertEquals($expected, $quoted);
index 726d63a..bdd567e 100644 (file)
@@ -27,7 +27,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideSelect
         * @covers DatabaseBase::select
         */
-       function testSelect( $sql, $sqlText ) {
+       public function testSelect( $sql, $sqlText ) {
                $this->database->select(
                        $sql['tables'],
                        $sql['fields'],
@@ -129,7 +129,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUpdate
         * @covers DatabaseBase::update
         */
-       function testUpdate( $sql, $sqlText ) {
+       public function testUpdate( $sql, $sqlText ) {
                $this->database->update(
                        $sql['table'],
                        $sql['values'],
@@ -181,7 +181,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideDelete
         * @covers DatabaseBase::delete
         */
-       function testDelete( $sql, $sqlText ) {
+       public function testDelete( $sql, $sqlText ) {
                $this->database->delete(
                        $sql['table'],
                        $sql['conds'],
@@ -214,7 +214,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUpsert
         * @covers DatabaseBase::upsert
         */
-       function testUpsert( $sql, $sqlText ) {
+       public function testUpsert( $sql, $sqlText ) {
                $this->database->upsert(
                        $sql['table'],
                        $sql['rows'],
@@ -250,7 +250,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideDeleteJoin
         * @covers DatabaseBase::deleteJoin
         */
-       function testDeleteJoin( $sql, $sqlText ) {
+       public function testDeleteJoin( $sql, $sqlText ) {
                $this->database->deleteJoin(
                        $sql['delTable'],
                        $sql['joinTable'],
@@ -297,7 +297,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideInsert
         * @covers DatabaseBase::insert
         */
-       function testInsert( $sql, $sqlText ) {
+       public function testInsert( $sql, $sqlText ) {
                $this->database->insert(
                        $sql['table'],
                        $sql['rows'],
@@ -350,7 +350,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideInsertSelect
         * @covers DatabaseBase::insertSelect
         */
-       function testInsertSelect( $sql, $sqlText ) {
+       public function testInsertSelect( $sql, $sqlText ) {
                $this->database->insertSelect(
                        $sql['destTable'],
                        $sql['srcTable'],
@@ -413,7 +413,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideReplace
         * @covers DatabaseBase::replace
         */
-       function testReplace( $sql, $sqlText ) {
+       public function testReplace( $sql, $sqlText ) {
                $this->database->replace(
                        $sql['table'],
                        $sql['uniqueIndexes'],
@@ -528,7 +528,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideNativeReplace
         * @covers DatabaseBase::nativeReplace
         */
-       function testNativeReplace( $sql, $sqlText ) {
+       public function testNativeReplace( $sql, $sqlText ) {
                $this->database->nativeReplace(
                        $sql['table'],
                        $sql['rows'],
@@ -555,7 +555,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideConditional
         * @covers DatabaseBase::conditional
         */
-       function testConditional( $sql, $sqlText ) {
+       public function testConditional( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->database->conditional(
                        $sql['conds'],
                        $sql['true'],
@@ -596,7 +596,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideBuildConcat
         * @covers DatabaseBase::buildConcat
         */
-       function testBuildConcat( $stringList, $sqlText ) {
+       public function testBuildConcat( $stringList, $sqlText ) {
                $this->assertEquals( trim( $this->database->buildConcat(
                        $stringList
                ) ), $sqlText );
@@ -619,7 +619,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideBuildLike
         * @covers DatabaseBase::buildLike
         */
-       function testBuildLike( $array, $sqlText ) {
+       public function testBuildLike( $array, $sqlText ) {
                $this->assertEquals( trim( $this->database->buildLike(
                        $array
                ) ), $sqlText );
@@ -650,7 +650,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUnionQueries
         * @covers DatabaseBase::unionQueries
         */
-       function testUnionQueries( $sql, $sqlText ) {
+       public function testUnionQueries( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->database->unionQueries(
                        $sql['sqls'],
                        $sql['all']
@@ -686,7 +686,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::commit
         */
-       function testTransactionCommit() {
+       public function testTransactionCommit() {
                $this->database->begin( __METHOD__ );
                $this->database->commit( __METHOD__ );
                $this->assertLastSql( 'BEGIN; COMMIT' );
@@ -695,7 +695,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::rollback
         */
-       function testTransactionRollback() {
+       public function testTransactionRollback() {
                $this->database->begin( __METHOD__ );
                $this->database->rollback( __METHOD__ );
                $this->assertLastSql( 'BEGIN; ROLLBACK' );
@@ -704,7 +704,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::dropTable
         */
-       function testDropTable() {
+       public function testDropTable() {
                $this->database->setExistingTables( array( 'table' ) );
                $this->database->dropTable( 'table', __METHOD__ );
                $this->assertLastSql( 'DROP TABLE table' );
@@ -713,7 +713,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::dropTable
         */
-       function testDropNonExistingTable() {
+       public function testDropNonExistingTable() {
                $this->assertFalse(
                        $this->database->dropTable( 'non_existing', __METHOD__ )
                );
index f151fb2..70ee946 100644 (file)
@@ -411,7 +411,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                return $indexes;
        }
 
-       function testCaseInsensitiveLike() {
+       public function testCaseInsensitiveLike() {
                // TODO: Test this for all databases
                $db = new DatabaseSqliteStandalone( ':memory:' );
                $res = $db->query( 'SELECT "a" LIKE "A" AS a' );
index 5e8e7a4..301fc99 100644 (file)
@@ -26,7 +26,7 @@ class DatabaseTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::dropTable
         */
-       function testAddQuotesNull() {
+       public function testAddQuotesNull() {
                $check = "NULL";
                if ( $this->db->getType() === 'sqlite' || $this->db->getType() === 'oracle' ) {
                        $check = "''";
@@ -34,7 +34,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $this->assertEquals( $check, $this->db->addQuotes( null ) );
        }
 
-       function testAddQuotesInt() {
+       public function testAddQuotesInt() {
                # returning just "1234" should be ok too, though...
                # maybe
                $this->assertEquals(
@@ -42,20 +42,20 @@ class DatabaseTest extends MediaWikiTestCase {
                        $this->db->addQuotes( 1234 ) );
        }
 
-       function testAddQuotesFloat() {
+       public function testAddQuotesFloat() {
                # returning just "1234.5678" would be ok too, though
                $this->assertEquals(
                        "'1234.5678'",
                        $this->db->addQuotes( 1234.5678 ) );
        }
 
-       function testAddQuotesString() {
+       public function testAddQuotesString() {
                $this->assertEquals(
                        "'string'",
                        $this->db->addQuotes( 'string' ) );
        }
 
-       function testAddQuotesStringQuote() {
+       public function testAddQuotesStringQuote() {
                $check = "'string''s cause trouble'";
                if ( $this->db->getType() === 'mysql' ) {
                        $check = "'string\'s cause trouble'";
@@ -115,21 +115,21 @@ class DatabaseTest extends MediaWikiTestCase {
                }
        }
 
-       function testTableNameLocal() {
+       public function testTableNameLocal() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename' ),
                        $this->db->tableName( 'tablename' )
                );
        }
 
-       function testTableNameRawLocal() {
+       public function testTableNameRawLocal() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', null, null, 'raw' ),
                        $this->db->tableName( 'tablename', 'raw' )
                );
        }
 
-       function testTableNameShared() {
+       public function testTableNameShared() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', 'sharedatabase', 'sh_' ),
                        $this->getSharedTableName( 'tablename', 'sharedatabase', 'sh_' )
@@ -141,7 +141,7 @@ class DatabaseTest extends MediaWikiTestCase {
                );
        }
 
-       function testTableNameRawShared() {
+       public function testTableNameRawShared() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', 'sharedatabase', 'sh_', 'raw' ),
                        $this->getSharedTableName( 'tablename', 'sharedatabase', 'sh_', 'raw' )
@@ -153,21 +153,21 @@ class DatabaseTest extends MediaWikiTestCase {
                );
        }
 
-       function testTableNameForeign() {
+       public function testTableNameForeign() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', 'databasename', '' ),
                        $this->db->tableName( 'databasename.tablename' )
                );
        }
 
-       function testTableNameRawForeign() {
+       public function testTableNameRawForeign() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', 'databasename', '', 'raw' ),
                        $this->db->tableName( 'databasename.tablename', 'raw' )
                );
        }
 
-       function testFillPreparedEmpty() {
+       public function testFillPreparedEmpty() {
                $sql = $this->db->fillPrepared(
                        'SELECT * FROM interwiki', array() );
                $this->assertEquals(
@@ -175,7 +175,7 @@ class DatabaseTest extends MediaWikiTestCase {
                        $sql );
        }
 
-       function testFillPreparedQuestion() {
+       public function testFillPreparedQuestion() {
                $sql = $this->db->fillPrepared(
                        'SELECT * FROM cur WHERE cur_namespace=? AND cur_title=?',
                        array( 4, "Snicker's_paradox" ) );
@@ -187,7 +187,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $this->assertEquals( $check, $sql );
        }
 
-       function testFillPreparedBang() {
+       public function testFillPreparedBang() {
                $sql = $this->db->fillPrepared(
                        'SELECT user_id FROM ! WHERE user_name=?',
                        array( '"user"', "Slash's Dot" ) );
@@ -199,7 +199,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $this->assertEquals( $check, $sql );
        }
 
-       function testFillPreparedRaw() {
+       public function testFillPreparedRaw() {
                $sql = $this->db->fillPrepared(
                        "SELECT * FROM cur WHERE cur_title='This_\\&_that,_WTF\\?\\!'",
                        array( '"user"', "Slash's Dot" ) );
@@ -208,7 +208,7 @@ class DatabaseTest extends MediaWikiTestCase {
                        $sql );
        }
 
-       function testStoredFunctions() {
+       public function testStoredFunctions() {
                if ( !in_array( wfGetDB( DB_MASTER )->getType(), array( 'mysql', 'postgres' ) ) ) {
                        $this->markTestSkipped( 'MySQL or Postgres required' );
                }
@@ -226,7 +226,7 @@ class DatabaseTest extends MediaWikiTestCase {
                );
        }
 
-       function testUnknownTableCorruptsResults() {
+       public function testUnknownTableCorruptsResults() {
                $res = $this->db->select( 'page', '*', array( 'page_id' => 1 ) );
                $this->assertFalse( $this->db->tableExists( 'foobarbaz' ) );
                $this->assertInternalType( 'int', $res->numRows() );
index e583d1b..7171ee5 100644 (file)
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  * @author Daniel Kinzler
  */
+
+/**
+ * @covers PageORMTableForTesting
+ */
 class ORMTableTest extends MediaWikiTestCase {
 
        /**
index f65642b..c9459c9 100644 (file)
@@ -40,6 +40,9 @@
  */
 require_once __DIR__ . "/ORMRowTest.php";
 
+/**
+ * @covers TestORMRow
+ */
 class TestORMRowTest extends ORMRowTest {
 
        /**
index 9026cb9..df73000 100644 (file)
@@ -21,7 +21,10 @@ class MWDebugTest extends MediaWikiTestCase {
                parent::tearDown();
        }
 
-       function testAddLog() {
+       /**
+        * @covers MWDebug::log
+        */
+       public function testAddLog() {
                MWDebug::log( 'logging a string' );
                $this->assertEquals(
                        array( array(
@@ -33,7 +36,10 @@ class MWDebugTest extends MediaWikiTestCase {
                );
        }
 
-       function testAddWarning() {
+       /**
+        * @covers MWDebug::warning
+        */
+       public function testAddWarning() {
                MWDebug::warning( 'Warning message' );
                $this->assertEquals(
                        array( array(
@@ -45,7 +51,10 @@ class MWDebugTest extends MediaWikiTestCase {
                );
        }
 
-       function testAvoidDuplicateDeprecations() {
+       /**
+        * @covers MWDebug::deprecated
+        */
+       public function testAvoidDuplicateDeprecations() {
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
 
@@ -56,7 +65,10 @@ class MWDebugTest extends MediaWikiTestCase {
                );
        }
 
-       function testAvoidNonConsecutivesDuplicateDeprecations() {
+       /**
+        * @covers MWDebug::deprecated
+        */
+       public function testAvoidNonConsecutivesDuplicateDeprecations() {
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
                MWDebug::warning( 'some warning' );
                MWDebug::log( 'we could have logged something too' );
index b760e26..e3a7556 100644 (file)
@@ -6,7 +6,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionOptionCanNotBeNull() {
+       public function testFileRepoConstructionOptionCanNotBeNull() {
                new FileRepo();
        }
 
@@ -14,7 +14,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
+       public function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
                new FileRepo( array() );
        }
 
@@ -22,7 +22,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionOptionNeedNameKey() {
+       public function testFileRepoConstructionOptionNeedNameKey() {
                new FileRepo( array(
                        'backend' => 'foobar'
                ) );
@@ -32,7 +32,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionOptionNeedBackendKey() {
+       public function testFileRepoConstructionOptionNeedBackendKey() {
                new FileRepo( array(
                        'name' => 'foobar'
                ) );
@@ -41,7 +41,7 @@ class FileRepoTest extends MediaWikiTestCase {
        /**
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionWithRequiredOptions() {
+       public function testFileRepoConstructionWithRequiredOptions() {
                $f = new FileRepo( array(
                        'name' => 'FileRepoTestRepository',
                        'backend' => new FSFileBackend( array(
index ea87ede..0e5f267 100644 (file)
@@ -9,7 +9,7 @@ class InstallDocFormatterTest extends MediaWikiTestCase {
         * @covers InstallDocFormatter::format
         * @dataProvider provideDocFormattingTests
         */
-       function testFormat( $expected, $unformattedText, $message = '' ) {
+       public function testFormat( $expected, $unformattedText, $message = '' ) {
                $this->assertEquals(
                        $expected,
                        InstallDocFormatter::format( $unformattedText ),
index 592500d..66e6559 100644 (file)
@@ -13,7 +13,7 @@ class OracleInstallerTest extends MediaWikiTestCase {
         * @dataProvider provideOracleConnectStrings
         * @covers OracleInstaller::checkConnectStringFormat
         */
-       function testCheckConnectStringFormat( $expected, $connectString, $msg = '' ) {
+       public function testCheckConnectStringFormat( $expected, $connectString, $msg = '' ) {
                $validity = $expected ? 'should be valid' : 'should NOT be valid';
                $msg = "'$connectString' ($msg) $validity.";
                $this->assertEquals( $expected,
index 6990153..3319490 100644 (file)
@@ -70,21 +70,33 @@ class JobQueueTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_queueLists
+        * @covers JobQueue::getWiki
         */
-       function testProperties( $queue, $recycles, $desc ) {
+       public function testGetWiki( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
                }
-
                $this->assertEquals( wfWikiID(), $queue->getWiki(), "Proper wiki ID ($desc)" );
+       }
+
+       /**
+        * @dataProvider provider_queueLists
+        * @covers JobQueue::getType
+        */
+       public function testGetType( $queue, $recycles, $desc ) {
+               $queue = $this->$queue;
+               if ( !$queue ) {
+                       $this->markTestSkipped( $desc );
+               }
                $this->assertEquals( 'null', $queue->getType(), "Proper job type ($desc)" );
        }
 
        /**
         * @dataProvider provider_queueLists
+        * @covers JobQueue
         */
-       function testBasicOperations( $queue, $recycles, $desc ) {
+       public function testBasicOperations( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
@@ -157,8 +169,9 @@ class JobQueueTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_queueLists
+        * @covers JobQueue
         */
-       function testBasicDeduplication( $queue, $recycles, $desc ) {
+       public function testBasicDeduplication( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
@@ -214,8 +227,9 @@ class JobQueueTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_queueLists
+        * @covers JobQueue
         */
-       function testRootDeduplication( $queue, $recycles, $desc ) {
+       public function testRootDeduplication( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
@@ -267,8 +281,9 @@ class JobQueueTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_fifoQueueLists
+        * @covers JobQueue
         */
-       function testJobOrder( $queue, $recycles, $desc ) {
+       public function testJobOrder( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
index eb024ab..3eeaaed 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @covers FormatJson
+ */
 class FormatJsonTest extends MediaWikiTestCase {
 
        public function testEncoderPrettyPrinting() {
index e9901ce..43df5eb 100644 (file)
@@ -20,8 +20,9 @@ class CSSMinTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideMinifyCases
+        * @covers CSSMin::minify
         */
-       function testMinify( $code, $expectedOutput ) {
+       public function testMinify( $code, $expectedOutput ) {
                $minified = CSSMin::minify( $code );
 
                $this->assertEquals( $expectedOutput, $minified, 'Minified output should be in the form expected.' );
@@ -69,8 +70,9 @@ class CSSMinTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideRemapCases
+        * @covers CSSMin::remap
         */
-       function testRemap( $message, $params, $expectedOutput ) {
+       public function testRemap( $message, $params, $expectedOutput ) {
                $remapped = call_user_func_array( 'CSSMin::remap', $params );
 
                $messageAdd = " Case: $message";
@@ -114,8 +116,9 @@ class CSSMinTest extends MediaWikiTestCase {
         *
         * @group Broken
         * @dataProvider provideStringCases
+        * @covers CSSMin::remap
         */
-       function testMinifyWithCSSStringValues( $code, $expectedOutput ) {
+       public function testMinifyWithCSSStringValues( $code, $expectedOutput ) {
                $this->testMinifyOutput( $code, $expectedOutput );
        }
 
index 7436c43..e2ec474 100644 (file)
@@ -83,6 +83,8 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         * @since 1.20
         *
         * @param array $elements
+        *
+        * @covers GenericArrayObject::__construct
         */
        public function testConstructor( array $elements ) {
                $arrayObject = $this->getNew( $elements );
@@ -96,6 +98,8 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         * @since 1.20
         *
         * @param array $elements
+        *
+        * @covers GenericArrayObject::isEmpty
         */
        public function testIsEmpty( array $elements ) {
                $arrayObject = $this->getNew( $elements );
@@ -109,6 +113,8 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         * @since 1.20
         *
         * @param GenericArrayObject $list
+        *
+        * @covers GenericArrayObject::offsetUnset
         */
        public function testUnset( GenericArrayObject $list ) {
                if ( $list->isEmpty() ) {
@@ -134,6 +140,8 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         * @since 1.20
         *
         * @param array $elements
+        *
+        * @covers GenericArrayObject::append
         */
        public function testAppend( array $elements ) {
                $list = $this->getNew();
@@ -163,6 +171,8 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         * @since 1.20
         *
         * @param callback $function
+        *
+        * @covers GenericArrayObject::getObjectType
         */
        protected function checkTypeChecks( $function ) {
                $excption = null;
@@ -194,6 +204,8 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         * @since 1.20
         *
         * @param array $elements
+        *
+        * @covers GenericArrayObject::offsetSet
         */
        public function testOffsetSet( array $elements ) {
                if ( $elements === array() ) {
@@ -247,6 +259,10 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         * @since 1.21
         *
         * @param GenericArrayObject $list
+        *
+        * @covers GenericArrayObject::getSerializationData
+        * @covers GenericArrayObject::serialize
+        * @covers GenericArrayObject::unserialize
         */
        public function testSerialization( GenericArrayObject $list ) {
                $serialization = serialize( $list );
index d04dd7d..b707123 100644 (file)
@@ -2,9 +2,14 @@
 
 /**
  * Tests for IEUrlExtension::findIE6Extension
+ * @todo tests below for findIE6Extension should be split into...
+ *    ...a dataprovider and test method.
  */
 class IEUrlExtensionTest extends MediaWikiTestCase {
-       function testSimple() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testSimple() {
                $this->assertEquals(
                        'y',
                        IEUrlExtension::findIE6Extension( 'x.y' ),
@@ -12,7 +17,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testSimpleNoExt() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testSimpleNoExt() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( 'x' ),
@@ -20,7 +28,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testEmpty() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testEmpty() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( '' ),
@@ -28,7 +39,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testQuestionMark() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testQuestionMark() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( '?' ),
@@ -36,7 +50,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testExtQuestionMark() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testExtQuestionMark() {
                $this->assertEquals(
                        'x',
                        IEUrlExtension::findIE6Extension( '.x?' ),
@@ -44,7 +61,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testQuestionMarkExt() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testQuestionMarkExt() {
                $this->assertEquals(
                        'x',
                        IEUrlExtension::findIE6Extension( '?.x' ),
@@ -52,7 +72,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testInvalidChar() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testInvalidChar() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( '.x*' ),
@@ -60,7 +83,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testInvalidCharThenExtension() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testInvalidCharThenExtension() {
                $this->assertEquals(
                        'x',
                        IEUrlExtension::findIE6Extension( '*.x' ),
@@ -68,7 +94,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testMultipleQuestionMarks() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testMultipleQuestionMarks() {
                $this->assertEquals(
                        'c',
                        IEUrlExtension::findIE6Extension( 'a?b?.c?.d?e?f' ),
@@ -76,7 +105,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testExeException() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testExeException() {
                $this->assertEquals(
                        'd',
                        IEUrlExtension::findIE6Extension( 'a?b?.exe?.d?.e' ),
@@ -84,7 +116,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testExeException2() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testExeException2() {
                $this->assertEquals(
                        'exe',
                        IEUrlExtension::findIE6Extension( 'a?b?.exe' ),
@@ -92,7 +127,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testHash() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testHash() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( 'a#b.c' ),
@@ -100,7 +138,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testHash2() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testHash2() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( 'a?#b.c' ),
@@ -108,7 +149,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testDotAtEnd() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testDotAtEnd() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( '.' ),
@@ -116,7 +160,10 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testTwoDots() {
+       /**
+        * @covers IEUrlExtension::findIE6Extension
+        */
+       public function testTwoDots() {
                $this->assertEquals(
                        'z',
                        IEUrlExtension::findIE6Extension( 'x.y.z' ),
index eb64a64..62ee45a 100644 (file)
@@ -118,8 +118,9 @@ class JavaScriptMinifierTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideCases
+        * @covers JavaScriptMinifier::minify
         */
-       function testJavaScriptMinifierOutput( $code, $expectedOutput ) {
+       public function testJavaScriptMinifierOutput( $code, $expectedOutput ) {
                $minified = JavaScriptMinifier::minify( $code );
 
                // JSMin+'s parser will throw an exception if output is not valid JS.
@@ -152,8 +153,9 @@ class JavaScriptMinifierTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideBug32548
+        * @covers JavaScriptMinifier::minify
         */
-       function testBug32548Exponent( $num ) {
+       public function testBug32548Exponent( $num ) {
                // Long line breaking was being incorrectly done between the base and
                // exponent part of a number, causing a syntax error. The line should
                // instead break at the start of the number.
index e8ccf43..9650fb1 100755 (executable)
@@ -61,6 +61,9 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                return $logEntry;
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        */
        public function testNormalLogParams() {
                $entry = $this->newLogEntry( 'test', array() );
                $formatter = LogFormatter::newFromEntry( $entry );
@@ -99,6 +102,10 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->assertEquals( $titleLink, $paramsWithoutTools[2]['raw'] );
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        * @covers LogFormatter::getActionText
+        */
        public function testLogParamsTypeRaw() {
                $params = array( '4:raw:raw' => Linker::link( $this->title, null, array(), array() ) );
                $expected = Linker::link( $this->title, null, array(), array() );
@@ -112,6 +119,10 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $logParam );
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        * @covers LogFormatter::getActionText
+        */
        public function testLogParamsTypeMsg() {
                $params = array( '4:msg:msg' => 'log-description-phpunit' );
                $expected = wfMessage( 'log-description-phpunit' )->text();
@@ -125,6 +136,10 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $logParam );
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        * @covers LogFormatter::getActionText
+        */
        public function testLogParamsTypeMsgContent() {
                $params = array( '4:msg-content:msgContent' => 'log-description-phpunit' );
                $expected = wfMessage( 'log-description-phpunit' )->inContentLanguage()->text();
@@ -138,6 +153,10 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $logParam );
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        * @covers LogFormatter::getActionText
+        */
        public function testLogParamsTypeNumber() {
                global $wgLang;
 
@@ -153,6 +172,10 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $logParam );
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        * @covers LogFormatter::getActionText
+        */
        public function testLogParamsTypeUserLink() {
                $params = array( '4:user-link:userLink' => $this->user->getName() );
                $expected = Linker::userLink(
@@ -169,6 +192,10 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $logParam );
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        * @covers LogFormatter::getActionText
+        */
        public function testLogParamsTypeTitleLink() {
                $params = array( '4:title-link:titleLink' => $this->title->getText() );
                $expected = Linker::link( $this->title, null, array(), array() );
@@ -182,6 +209,10 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $logParam );
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        * @covers LogFormatter::getActionText
+        */
        public function testLogParamsTypePlain() {
                $params = array( '4:plain:plain' => 'Some plain text' );
                $expected = 'Some plain text';
@@ -195,6 +226,10 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $logParam );
        }
 
+       /**
+        * @covers LogFormatter::newFromEntry
+        * @covers LogFormatter::getComment
+        */
        public function testLogComment() {
                $entry = $this->newLogEntry( 'test', array() );
                $formatter = LogFormatter::newFromEntry( $entry );
index 43792c1..a0e63a8 100644 (file)
@@ -16,6 +16,7 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
         * Basically the file has IPTC and XMP metadata, the
         * IPTC should override the XMP, except for the multilingual
         * translation (to en) where XMP should win.
+        * @covers BitmapMetadataHandler::Jpeg
         */
        public function testMultilingualCascade() {
                if ( !extension_loaded( 'exif' ) ) {
@@ -48,6 +49,7 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
         *
         * There's more extensive tests of comment extraction in
         * JpegMetadataExtractorTests.php
+        * @covers BitmapMetadataHandler::Jpeg
         */
        public function testJpegComment() {
                $meta = BitmapMetadataHandler::Jpeg( $this->filePath .
@@ -60,6 +62,7 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
        /**
         * Make sure a bad iptc block doesn't stop the other metadata
         * from being extracted.
+        * @covers BitmapMetadataHandler::Jpeg
         */
        public function testBadIPTC() {
                $meta = BitmapMetadataHandler::Jpeg( $this->filePath .
@@ -67,6 +70,9 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
                $this->assertEquals( 'Created with GIMP', $meta['JPEGFileComment'][0] );
        }
 
+       /**
+        * @covers BitmapMetadataHandler::Jpeg
+        */
        public function testIPTCDates() {
                $meta = BitmapMetadataHandler::Jpeg( $this->filePath .
                        'iptc-timetest.jpg' );
@@ -78,6 +84,7 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
        /**
         * File has an invalid time (+ one valid but really weird time)
         * that shouldn't be included
+        * @covers BitmapMetadataHandler::Jpeg
         */
        public function testIPTCDatesInvalid() {
                $meta = BitmapMetadataHandler::Jpeg( $this->filePath .
@@ -91,6 +98,8 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
         * XMP data should take priority over iptc data
         * when hash has been updated, but not when
         * the hash is wrong.
+        * @covers BitmapMetadataHandler::addMetadata
+        * @covers BitmapMetadataHandler::getMetadataArray
         */
        public function testMerging() {
                $merger = new BitmapMetadataHandler();
@@ -114,6 +123,9 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $actual );
        }
 
+       /**
+        * @covers BitmapMetadataHandler::png
+        */
        public function testPNGXMP() {
                if ( !extension_loaded( 'xml' ) ) {
                        $this->markTestSkipped( "This test needs the xml extension." );
@@ -134,6 +146,9 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $result );
        }
 
+       /**
+        * @covers BitmapMetadataHandler::png
+        */
        public function testPNGNative() {
                $handler = new BitmapMetadataHandler();
                $result = $handler->png( $this->filePath . 'Png-native-test.png' );
@@ -141,6 +156,9 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $result['metadata']['Identifier']['x-default'] );
        }
 
+       /**
+        * @covers BitmapMetadataHandler::getTiffByteOrder
+        */
        public function testTiffByteOrder() {
                $handler = new BitmapMetadataHandler();
                $res = $handler->getTiffByteOrder( $this->filePath . 'test.tiff' );
index c4706bf..9395b66 100644 (file)
@@ -13,8 +13,9 @@ class BitmapScalingTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideNormaliseParams
+        * @covers BitmapHandler::normaliseParams
         */
-       function testNormaliseParams( $fileDimensions, $expectedParams, $params, $msg ) {
+       public function testNormaliseParams( $fileDimensions, $expectedParams, $params, $msg ) {
                $file = new FakeDimensionFile( $fileDimensions );
                $handler = new BitmapHandler;
                $valid = $handler->normaliseParams( $file, $params );
@@ -102,7 +103,10 @@ class BitmapScalingTest extends MediaWikiTestCase {
                );
        }
 
-       function testTooBigImage() {
+       /**
+        * @covers BitmapHandler::doTransform
+        */
+       public function testTooBigImage() {
                $file = new FakeDimensionFile( array( 4000, 4000 ) );
                $handler = new BitmapHandler;
                $params = array( 'width' => '3700' ); // Still bigger than max size.
@@ -110,7 +114,10 @@ class BitmapScalingTest extends MediaWikiTestCase {
                        get_class( $handler->doTransform( $file, 'dummy path', '', $params ) ) );
        }
 
-       function testTooBigMustRenderImage() {
+       /**
+        * @covers BitmapHandler::doTransform
+        */
+       public function testTooBigMustRenderImage() {
                $file = new FakeDimensionFile( array( 4000, 4000 ) );
                $file->mustRender = true;
                $handler = new BitmapHandler;
@@ -119,36 +126,12 @@ class BitmapScalingTest extends MediaWikiTestCase {
                        get_class( $handler->doTransform( $file, 'dummy path', '', $params ) ) );
        }
 
-       function testImageArea() {
+       /**
+        * @covers BitmapHandler::getImageArea
+        */
+       public function testImageArea() {
                $file = new FakeDimensionFile( array( 7, 9 ) );
                $handler = new BitmapHandler;
                $this->assertEquals( 63, $handler->getImageArea( $file ) );
        }
 }
-
-class FakeDimensionFile extends File {
-       public $mustRender = false;
-
-       public function __construct( $dimensions ) {
-               parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
-                       new NullRepo( null ) );
-
-               $this->dimensions = $dimensions;
-       }
-
-       public function getWidth( $page = 1 ) {
-               return $this->dimensions[0];
-       }
-
-       public function getHeight( $page = 1 ) {
-               return $this->dimensions[1];
-       }
-
-       public function mustRender() {
-               return $this->mustRender;
-       }
-
-       public function getPath() {
-               return '';
-       }
-}
index 532182c..a2e0eb6 100644 (file)
@@ -2,6 +2,11 @@
 
 class ExifBitmapTest extends MediaWikiTestCase {
 
+       /**
+        * @var ExifBitmapHandler
+        */
+       protected $handler;
+
        protected function setUp() {
                parent::setUp();
                if ( !extension_loaded( 'exif' ) ) {
@@ -14,42 +19,62 @@ class ExifBitmapTest extends MediaWikiTestCase {
 
        }
 
+       /**
+        * @covers ExifBitmapHandler::isMetadataValid
+        */
        public function testIsOldBroken() {
                $res = $this->handler->isMetadataValid( null, ExifBitmapHandler::OLD_BROKEN_FILE );
                $this->assertEquals( ExifBitmapHandler::METADATA_COMPATIBLE, $res );
        }
 
+       /**
+        * @covers ExifBitmapHandler::isMetadataValid
+        */
        public function testIsBrokenFile() {
                $res = $this->handler->isMetadataValid( null, ExifBitmapHandler::BROKEN_FILE );
                $this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res );
        }
 
+       /**
+        * @covers ExifBitmapHandler::isMetadataValid
+        */
        public function testIsInvalid() {
                $res = $this->handler->isMetadataValid( null, 'Something Invalid Here.' );
                $this->assertEquals( ExifBitmapHandler::METADATA_BAD, $res );
        }
 
+       /**
+        * @covers ExifBitmapHandler::isMetadataValid
+        */
        public function testGoodMetadata() {
                $meta = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
                $res = $this->handler->isMetadataValid( null, $meta );
                $this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res );
        }
 
+       /**
+        * @covers ExifBitmapHandler::isMetadataValid
+        */
        public function testIsOldGood() {
                $meta = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}';
                $res = $this->handler->isMetadataValid( null, $meta );
                $this->assertEquals( ExifBitmapHandler::METADATA_COMPATIBLE, $res );
        }
 
-       // Handle metadata from paged tiff handler (gotten via instant commons)
-       // gracefully.
+       /**
+        * Handle metadata from paged tiff handler (gotten via instant commons) gracefully.
+        * @covers ExifBitmapHandler::isMetadataValid
+        */
        public function testPagedTiffHandledGracefully() {
                $meta = 'a:6:{s:9:"page_data";a:1:{i:1;a:5:{s:5:"width";i:643;s:6:"height";i:448;s:5:"alpha";s:4:"true";s:4:"page";i:1;s:6:"pixels";i:288064;}}s:10:"page_count";i:1;s:10:"first_page";i:1;s:9:"last_page";i:1;s:4:"exif";a:9:{s:10:"ImageWidth";i:643;s:11:"ImageLength";i:448;s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:4;s:12:"RowsPerStrip";i:50;s:19:"PlanarConfiguration";i:1;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}s:21:"TIFF_METADATA_VERSION";s:3:"1.4";}';
                $res = $this->handler->isMetadataValid( null, $meta );
                $this->assertEquals( ExifBitmapHandler::METADATA_BAD, $res );
        }
 
-       function testConvertMetadataLatest() {
+       /**
+        * @covers ExifBitmapHandler::convertMetadataVersion
+        */
+       public function testConvertMetadataLatest() {
                $metadata = array(
                        'foo' => array( 'First', 'Second', '_type' => 'ol' ),
                        'MEDIAWIKI_EXIF_VERSION' => 2
@@ -58,7 +83,10 @@ class ExifBitmapTest extends MediaWikiTestCase {
                $this->assertEquals( $metadata, $res );
        }
 
-       function testConvertMetadataToOld() {
+       /**
+        * @covers ExifBitmapHandler::convertMetadataVersion
+        */
+       public function testConvertMetadataToOld() {
                $metadata = array(
                        'foo' => array( 'First', 'Second', '_type' => 'ol' ),
                        'bar' => array( 'First', 'Second', '_type' => 'ul' ),
@@ -77,7 +105,10 @@ class ExifBitmapTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $res );
        }
 
-       function testConvertMetadataSoftware() {
+       /**
+        * @covers ExifBitmapHandler::convertMetadataVersion
+        */
+       public function testConvertMetadataSoftware() {
                $metadata = array(
                        'Software' => array( array( 'GIMP', '1.1' ) ),
                        'MEDIAWIKI_EXIF_VERSION' => 2,
@@ -90,7 +121,10 @@ class ExifBitmapTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $res );
        }
 
-       function testConvertMetadataSoftwareNormal() {
+       /**
+        * @covers ExifBitmapHandler::convertMetadataVersion
+        */
+       public function testConvertMetadataSoftwareNormal() {
                $metadata = array(
                        'Software' => array( "GIMP 1.2", "vim" ),
                        'MEDIAWIKI_EXIF_VERSION' => 2,
index c16de8b..64276d9 100644 (file)
@@ -3,6 +3,8 @@
  * Tests related to auto rotation.
  *
  * @group medium
+ *
+ * @todo covers tags
  */
 class ExifRotationTest extends MediaWikiTestCase {
 
@@ -34,10 +36,9 @@ class ExifRotationTest extends MediaWikiTestCase {
        }
 
        /**
-        *
         * @dataProvider provideFiles
         */
-       function testMetadata( $name, $type, $info ) {
+       public function testMetadata( $name, $type, $info ) {
                if ( !BitmapHandler::canRotate() ) {
                        $this->markTestSkipped( "This test needs a rasterizer that can auto-rotate." );
                }
@@ -50,7 +51,7 @@ class ExifRotationTest extends MediaWikiTestCase {
         *
         * @dataProvider provideFiles
         */
-       function testRotationRendering( $name, $type, $info, $thumbs ) {
+       public function testRotationRendering( $name, $type, $info, $thumbs ) {
                if ( !BitmapHandler::canRotate() ) {
                        $this->markTestSkipped( "This test needs a rasterizer that can auto-rotate." );
                }
@@ -129,7 +130,7 @@ class ExifRotationTest extends MediaWikiTestCase {
         * Same as before, but with auto-rotation disabled.
         * @dataProvider provideFilesNoAutoRotate
         */
-       function testMetadataNoAutoRotate( $name, $type, $info ) {
+       public function testMetadataNoAutoRotate( $name, $type, $info ) {
                $this->setMwGlobals( 'wgEnableAutoRotation', false );
 
                $file = $this->dataFile( $name, $type );
@@ -141,7 +142,7 @@ class ExifRotationTest extends MediaWikiTestCase {
         *
         * @dataProvider provideFilesNoAutoRotate
         */
-       function testRotationRenderingNoAutoRotate( $name, $type, $info, $thumbs ) {
+       public function testRotationRenderingNoAutoRotate( $name, $type, $info, $thumbs ) {
                $this->setMwGlobals( 'wgEnableAutoRotation', false );
 
                foreach ( $thumbs as $size => $out ) {
@@ -216,7 +217,7 @@ class ExifRotationTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideBitmapExtractPreRotationDimensions
         */
-       function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
+       public function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
                $result = $this->handler->extractPreRotationDimensions( array(
                        'physicalWidth' => self::TEST_WIDTH,
                        'physicalHeight' => self::TEST_HEIGHT,
index b84ed56..4cd2e8e 100644 (file)
@@ -1,6 +1,13 @@
 <?php
+
+/**
+ * @covers Exif
+ */
 class ExifTest extends MediaWikiTestCase {
 
+       /** @var string */
+       protected $mediaPath;
+
        protected function setUp() {
                parent::setUp();
                if ( !extension_loaded( 'exif' ) ) {
diff --git a/tests/phpunit/includes/media/FakeDimensionFile.php b/tests/phpunit/includes/media/FakeDimensionFile.php
new file mode 100644 (file)
index 0000000..7926000
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+class FakeDimensionFile extends File {
+       public $mustRender = false;
+
+       public function __construct( $dimensions ) {
+               parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
+                       new NullRepo( null ) );
+
+               $this->dimensions = $dimensions;
+       }
+
+       public function getWidth( $page = 1 ) {
+               return $this->dimensions[0];
+       }
+
+       public function getHeight( $page = 1 ) {
+               return $this->dimensions[1];
+       }
+
+       public function mustRender() {
+               return $this->mustRender;
+       }
+
+       public function getPath() {
+               return '';
+       }
+}
\ No newline at end of file
index bee0906..a8e420f 100644 (file)
@@ -1,6 +1,12 @@
 <?php
+
 class FormatMetadataTest extends MediaWikiTestCase {
 
+       /** @var FSFileBackend */
+       protected $backend;
+       /** @var FSRepo */
+       protected $repo;
+
        protected function setUp() {
                parent::setUp();
 
@@ -22,6 +28,9 @@ class FormatMetadataTest extends MediaWikiTestCase {
                $this->setMwGlobals( 'wgShowEXIF', true );
        }
 
+       /**
+        * @covers File::formatMetadata
+        */
        public function testInvalidDate() {
                $file = $this->dataFile( 'broken_exif_date.jpg', 'image/jpeg' );
 
index 86cf346..9e3f924 100644 (file)
@@ -12,6 +12,7 @@ class GIFMetadataExtractorTest extends MediaWikiTestCase {
         * @param $filename String
         * @param $expected Array The extracted metadata.
         * @dataProvider provideGetMetadata
+        * @covers GIFMetadataExtractor::getMetadata
         */
        public function testGetMetadata( $filename, $expected ) {
                $actual = GIFMetadataExtractor::getMetadata( $this->mediaPath . $filename );
index 7ea6b7e..c8e729c 100644 (file)
@@ -1,6 +1,15 @@
 <?php
 class GIFHandlerTest extends MediaWikiTestCase {
 
+       /** @var FSFileBackend */
+       protected $backend;
+       /** @var GIFHandler */
+       protected $handler;
+       /** @var FSRepo */
+       protected $repo;
+       /** @var string */
+       protected $filePath;
+
        protected function setUp() {
                parent::setUp();
 
@@ -18,6 +27,9 @@ class GIFHandlerTest extends MediaWikiTestCase {
                $this->handler = new GIFHandler();
        }
 
+       /**
+        * @covers GIFHandler::getMetadata
+        */
        public function testInvalidFile() {
                $res = $this->handler->getMetadata( null, $this->filePath . '/README' );
                $this->assertEquals( GIFHandler::BROKEN_FILE, $res );
@@ -27,6 +39,7 @@ class GIFHandlerTest extends MediaWikiTestCase {
         * @param $filename String basename of the file to check
         * @param $expected boolean Expected result.
         * @dataProvider provideIsAnimated
+        * @covers GIFHandler::isAnimatedImage
         */
        public function testIsAnimanted( $filename, $expected ) {
                $file = $this->dataFile( $filename, 'image/gif' );
@@ -45,6 +58,7 @@ class GIFHandlerTest extends MediaWikiTestCase {
         * @param $filename String
         * @param $expected Integer Total image area
         * @dataProvider provideGetImageArea
+        * @covers GIFHandler::getImageArea
         */
        public function testGetImageArea( $filename, $expected ) {
                $file = $this->dataFile( $filename, 'image/gif' );
@@ -63,6 +77,7 @@ class GIFHandlerTest extends MediaWikiTestCase {
         * @param $metadata String Serialized metadata
         * @param $expected Integer One of the class constants of GIFHandler
         * @dataProvider provideIsMetadataValid
+        * @covers GIFHandler::isMetadataValid
         */
        public function testIsMetadataValid( $metadata, $expected ) {
                $actual = $this->handler->isMetadataValid( null, $metadata );
@@ -83,6 +98,7 @@ class GIFHandlerTest extends MediaWikiTestCase {
         * @param $filename String
         * @param $expected String Serialized array
         * @dataProvider provideGetMetadata
+        * @covers GIFHandler::getMetadata
         */
        public function testGetMetadata( $filename, $expected ) {
                $file = $this->dataFile( $filename, 'image/gif' );
index 81a58dd..81c1d28 100644 (file)
@@ -1,11 +1,19 @@
 <?php
+
 class IPTCTest extends MediaWikiTestCase {
+
+       /**
+        * @covers IPTC::getCharset
+        */
        public function testRecognizeUtf8() {
                // utf-8 is the only one used in practise.
                $res = IPTC::getCharset( "\x1b%G" );
                $this->assertEquals( 'UTF-8', $res );
        }
 
+       /**
+        * @covers IPTC::Parse
+        */
        public function testIPTCParseNoCharset88591() {
                // basically IPTC for keyword with value of 0xBC which is 1/4 in iso-8859-1
                // This data doesn't specify a charset. We're supposed to guess
@@ -15,17 +23,22 @@ class IPTCTest extends MediaWikiTestCase {
                $this->assertEquals( array( '¼' ), $res['Keywords'] );
        }
 
-       /* This one contains a sequence that's valid iso 8859-1 but not valid utf8 */
-       /* \xC3 = Ã, \xB8 = ¸  */
+       /**
+        * @covers IPTC::Parse
+        */
        public function testIPTCParseNoCharset88591b() {
+               /* This one contains a sequence that's valid iso 8859-1 but not valid utf8 */
+               /* \xC3 = Ã, \xB8 = ¸  */
                $iptcData = "Photoshop 3.0\08BIM\4\4\0\0\0\0\0\x09\x1c\x02\x19\x00\x04\xC3\xC3\xC3\xB8";
                $res = IPTC::Parse( $iptcData );
                $this->assertEquals( array( 'ÃÃø' ), $res['Keywords'] );
        }
 
-       /* Same as testIPTCParseNoCharset88591b, but forcing the charset to utf-8.
+       /**
+        * Same as testIPTCParseNoCharset88591b, but forcing the charset to utf-8.
         * What should happen is the first "\xC3\xC3" should be dropped as invalid,
         * leaving \xC3\xB8, which is ø
+        * @covers IPTC::Parse
         */
        public function testIPTCParseForcedUTFButInvalid() {
                $iptcData = "Photoshop 3.0\08BIM\4\4\0\0\0\0\0\x11\x1c\x02\x19\x00\x04\xC3\xC3\xC3\xB8"
@@ -34,13 +47,19 @@ class IPTCTest extends MediaWikiTestCase {
                $this->assertEquals( array( 'ø' ), $res['Keywords'] );
        }
 
+       /**
+        * @covers IPTC::Parse
+        */
        public function testIPTCParseNoCharsetUTF8() {
                $iptcData = "Photoshop 3.0\08BIM\4\4\0\0\0\0\0\x07\x1c\x02\x19\x00\x02¼";
                $res = IPTC::Parse( $iptcData );
                $this->assertEquals( array( '¼' ), $res['Keywords'] );
        }
 
-       // Testing something that has 2 values for keyword
+       /**
+        * Testing something that has 2 values for keyword
+        * @covers IPTC::Parse
+        */
        public function testIPTCParseMulti() {
                $iptcData = /* identifier */ "Photoshop 3.0\08BIM\4\4"
                        /* length */ . "\0\0\0\0\0\x0D"
@@ -50,6 +69,9 @@ class IPTCTest extends MediaWikiTestCase {
                $this->assertEquals( array( '¼', '¼½' ), $res['Keywords'] );
        }
 
+       /**
+        * @covers IPTC::Parse
+        */
        public function testIPTCParseUTF8() {
                // This has the magic "\x1c\x01\x5A\x00\x03\x1B\x25\x47" which marks content as UTF8.
                $iptcData = "Photoshop 3.0\08BIM\4\4\0\0\0\0\0\x0F\x1c\x02\x19\x00\x02¼\x1c\x01\x5A\x00\x03\x1B\x25\x47";
index cae7137..6d1d681 100644 (file)
@@ -5,9 +5,13 @@
  * serve as a very good "test". (Adobe photoshop probably creates such files
  * but it costs money). The implementation of it currently in MediaWiki is based
  * solely on reading the standard, without any real world test files.
+ *
+ * @covers JpegMetadataExtractor
  */
 class JpegMetadataExtractorTest extends MediaWikiTestCase {
 
+       protected $filePath;
+
        protected function setUp() {
                parent::setUp();
 
@@ -18,7 +22,7 @@ class JpegMetadataExtractorTest extends MediaWikiTestCase {
         * We also use this test to test padding bytes don't
         * screw stuff up
         *
-        * @param $file filename
+        * @param string $file filename
         *
         * @dataProvider provideUtf8Comment
         */
index 7775c41..ce956ba 100644 (file)
@@ -1,6 +1,11 @@
 <?php
+/**
+ * @covers JpegHandler
+ */
 class JpegTest extends MediaWikiTestCase {
 
+       protected $filePath;
+
        protected function setUp() {
                parent::setUp();
                if ( !extension_loaded( 'exif' ) ) {
index 4e4c649..c28898b 100644 (file)
@@ -1,7 +1,12 @@
 <?php
 
 class MediaHandlerTest extends MediaWikiTestCase {
-       function testFitBoxWidth() {
+
+       /**
+        * @covers MediaHandler::fitBoxWidth
+        * @todo split into a dataprovider and test method
+        */
+       public function testFitBoxWidth() {
                $vals = array(
                        array(
                                'width' => 50,
index 58d791f..33a03a2 100644 (file)
@@ -1,4 +1,8 @@
 <?php
+
+/**
+ * @covers PNGMetadataExtractor
+ */
 class PNGMetadataExtractorTest extends MediaWikiTestCase {
 
        protected function setUp() {
@@ -9,7 +13,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
        /**
         * Tests zTXt tag (compressed textual metadata)
         */
-       function testPngNativetZtxt() {
+       public function testPngNativetZtxt() {
                $this->checkPHPExtension( 'zlib' );
 
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
@@ -26,7 +30,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
        /**
         * Test tEXt tag (Uncompressed textual metadata)
         */
-       function testPngNativeText() {
+       public function testPngNativeText() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Png-native-test.png' );
                $expected = "Some long image desc";
@@ -43,7 +47,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
         * tEXt tags must be encoded iso-8859-1 (vs iTXt which are utf-8)
         * Make sure non-ascii characters get converted properly
         */
-       function testPngNativeTextNonAscii() {
+       public function testPngNativeTextNonAscii() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Png-native-test.png' );
 
@@ -65,7 +69,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
         * actual resolution of the image is (aka in dots per meter).
         */
        /*
-       function testPngPhysTag() {
+       public function testPngPhysTag() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Png-native-test.png' );
 
@@ -81,7 +85,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
        /**
         * Given a normal static PNG, check the animation metadata returned.
         */
-       function testStaticPngAnimationMetadata() {
+       public function testStaticPngAnimationMetadata() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Png-native-test.png' );
 
@@ -94,7 +98,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
         * Given an animated APNG image file
         * check it gets animated metadata right.
         */
-       function testApngAnimationMetadata() {
+       public function testApngAnimationMetadata() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Animated_PNG_example_bouncing_beach_ball.png' );
 
@@ -104,46 +108,46 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
                $this->assertEquals( 1.5, $meta['duration'], '', 0.00001 );
        }
 
-       function testPngBitDepth8() {
+       public function testPngBitDepth8() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Png-native-test.png' );
 
                $this->assertEquals( 8, $meta['bitDepth'] );
        }
 
-       function testPngBitDepth1() {
+       public function testPngBitDepth1() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        '1bit-png.png' );
                $this->assertEquals( 1, $meta['bitDepth'] );
        }
 
 
-       function testPngIndexColour() {
+       public function testPngIndexColour() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Png-native-test.png' );
 
                $this->assertEquals( 'index-coloured', $meta['colorType'] );
        }
 
-       function testPngRgbColour() {
+       public function testPngRgbColour() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'rgb-png.png' );
                $this->assertEquals( 'truecolour-alpha', $meta['colorType'] );
        }
 
-       function testPngRgbNoAlphaColour() {
+       public function testPngRgbNoAlphaColour() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'rgb-na-png.png' );
                $this->assertEquals( 'truecolour', $meta['colorType'] );
        }
 
-       function testPngGreyscaleColour() {
+       public function testPngGreyscaleColour() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'greyscale-png.png' );
                $this->assertEquals( 'greyscale-alpha', $meta['colorType'] );
        }
 
-       function testPngGreyscaleNoAlphaColour() {
+       public function testPngGreyscaleNoAlphaColour() {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'greyscale-na-png.png' );
                $this->assertEquals( 'greyscale', $meta['colorType'] );
index 855780d..ad4c249 100644 (file)
@@ -1,6 +1,15 @@
 <?php
 class PNGHandlerTest extends MediaWikiTestCase {
 
+       /** @var PNGHandler */
+       protected $handler;
+       /** @var FSRepo */
+       protected $repo;
+       /** @var FSFileBackend */
+       protected $backend;
+       /** @var string */
+       protected $filePath;
+
        protected function setUp() {
                parent::setUp();
 
@@ -18,6 +27,9 @@ class PNGHandlerTest extends MediaWikiTestCase {
                $this->handler = new PNGHandler();
        }
 
+       /**
+        * @covers PNGHandler::getMetadata
+        */
        public function testInvalidFile() {
                $res = $this->handler->getMetadata( null, $this->filePath . '/README' );
                $this->assertEquals( PNGHandler::BROKEN_FILE, $res );
@@ -27,6 +39,7 @@ class PNGHandlerTest extends MediaWikiTestCase {
         * @param $filename String basename of the file to check
         * @param $expected boolean Expected result.
         * @dataProvider provideIsAnimated
+        * @covers PNGHandler::isAnimatedImage
         */
        public function testIsAnimanted( $filename, $expected ) {
                $file = $this->dataFile( $filename, 'image/png' );
@@ -45,6 +58,7 @@ class PNGHandlerTest extends MediaWikiTestCase {
         * @param $filename String
         * @param $expected Integer Total image area
         * @dataProvider provideGetImageArea
+        * @covers PNGHandler::getImageArea
         */
        public function testGetImageArea( $filename, $expected ) {
                $file = $this->dataFile( $filename, 'image/png' );
@@ -65,6 +79,7 @@ class PNGHandlerTest extends MediaWikiTestCase {
         * @param $metadata String Serialized metadata
         * @param $expected Integer One of the class constants of PNGHandler
         * @dataProvider provideIsMetadataValid
+        * @covers PNGHandler::isMetadataValid
         */
        public function testIsMetadataValid( $metadata, $expected ) {
                $actual = $this->handler->isMetadataValid( null, $metadata );
@@ -85,6 +100,7 @@ class PNGHandlerTest extends MediaWikiTestCase {
         * @param $filename String
         * @param $expected String Serialized array
         * @dataProvider provideGetMetadata
+        * @covers PNGHandler::getMetadata
         */
        public function testGetMetadata( $filename, $expected ) {
                $file = $this->dataFile( $filename, 'image/png' );
index 3bf9c59..5dd7b24 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @covers SVGMetadataExtractor
+ */
 class SVGMetadataExtractorTest extends MediaWikiTestCase {
 
        protected function setUp() {
@@ -10,14 +13,14 @@ class SVGMetadataExtractorTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideSvgFiles
         */
-       function testGetMetadata( $infile, $expected ) {
+       public function testGetMetadata( $infile, $expected ) {
                $this->assertMetadata( $infile, $expected );
        }
 
        /**
         * @dataProvider provideSvgFilesWithXMLMetadata
         */
-       function testGetXMLMetadata( $infile, $expected ) {
+       public function testGetXMLMetadata( $infile, $expected ) {
                $r = new XMLReader();
                if ( !method_exists( $r, 'readInnerXML' ) ) {
                        $this->markTestSkipped( 'XMLReader::readInnerXML() does not exist (libxml >2.6.20 needed).' );
index 1ec34d5..8d74b98 100644 (file)
@@ -1,6 +1,11 @@
 <?php
 class TiffTest extends MediaWikiTestCase {
 
+       /** @var TiffHandler */
+       protected $handler;
+       /** @var string */
+       protected $filePath;
+
        protected function setUp() {
                parent::setUp();
                if ( !extension_loaded( 'exif' ) ) {
@@ -13,11 +18,17 @@ class TiffTest extends MediaWikiTestCase {
                $this->handler = new TiffHandler;
        }
 
+       /**
+        * @covers TiffHandler::getMetadata
+        */
        public function testInvalidFile() {
                $res = $this->handler->getMetadata( null, $this->filePath . 'README' );
                $this->assertEquals( ExifBitmapHandler::BROKEN_FILE, $res );
        }
 
+       /**
+        * @covers TiffHandler::getMetadata
+        */
        public function testTiffMetadataExtraction() {
                $res = $this->handler->getMetadata( null, $this->filePath . 'test.tiff' );
                $expected = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
index aa0cdd2..9ec5796 100644 (file)
@@ -1,4 +1,8 @@
 <?php
+
+/**
+ * @todo covers tags
+ */
 class XMPTest extends MediaWikiTestCase {
 
        protected function setUp() {
@@ -15,7 +19,10 @@ class XMPTest extends MediaWikiTestCase {
         * @param $expected Array expected result of parsing the xmp.
         * @param $info String Short sentence on what's being tested.
         *
+        * @throws Exception
         * @dataProvider provideXMPParse
+        *
+        * @covers XMPReader::parse
         */
        public function testXMPParse( $xmp, $expected, $info ) {
                if ( !is_string( $xmp ) || !is_array( $expected ) ) {
@@ -74,8 +81,10 @@ class XMPTest extends MediaWikiTestCase {
         *
         * @todo This is based on what the standard says. Need to find a real
         * world example file to double check the support for this is right.
+        *
+        * @covers XMPReader::parseExtended
         */
-       function testExtendedXMP() {
+       public function testExtendedXMP() {
                $xmpPath = __DIR__ . '/../../data/xmp/';
                $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
                $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -104,8 +113,10 @@ class XMPTest extends MediaWikiTestCase {
        /**
         * This test has an extended XMP block with a wrong guid (md5sum)
         * and thus should only return the StandardXMP, not the ExtendedXMP.
+        *
+        * @covers XMPReader::parseExtended
         */
-       function testExtendedXMPWithWrongGUID() {
+       public function testExtendedXMPWithWrongGUID() {
                $xmpPath = __DIR__ . '/../../data/xmp/';
                $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
                $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -133,8 +144,10 @@ class XMPTest extends MediaWikiTestCase {
        /**
         * Have a high offset to simulate a missing packet,
         * which should cause it to ignore the ExtendedXMP packet.
+        *
+        * @covers XMPReader::parseExtended
         */
-       function testExtendedXMPMissingPacket() {
+       public function testExtendedXMPMissingPacket() {
                $xmpPath = __DIR__ . '/../../data/xmp/';
                $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
                $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
index 257c40a..96bf5e4 100644 (file)
@@ -3,8 +3,9 @@ class XMPValidateTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideDates
+        * @covers XMPValidate::validateDate
         */
-       function testValidateDate( $value, $expected ) {
+       public function testValidateDate( $value, $expected ) {
                // The method should modify $value.
                XMPValidate::validateDate( array(), $value, true );
                $this->assertEquals( $expected, $value );
index 68efd86..a495700 100644 (file)
  * @ingroup UtfNormal
  * @group Large
  *
+ * @todo covers tags, will be UtfNormal::cleanUp once the below is resolved
+ * @todo split me into test methods and providers per the below comment
+ *
  * We ignore code coverage for this test suite until they are rewritten
  * to use data providers (bug 46561).
  * @codeCoverageIgnore
  */
 class CleanUpTest extends MediaWikiTestCase {
        /** @todo document */
-       function testAscii() {
+       public function testAscii() {
                $text = 'This is plain ASCII text.';
                $this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
        }
 
        /** @todo document */
-       function testNull() {
+       public function testNull() {
                $text = "a \x00 null";
                $expect = "a \xef\xbf\xbd null";
                $this->assertEquals(
@@ -52,13 +55,13 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testLatin() {
+       public function testLatin() {
                $text = "L'\xc3\xa9cole";
                $this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
        }
 
        /** @todo document */
-       function testLatinNormal() {
+       public function testLatinNormal() {
                $text = "L'e\xcc\x81cole";
                $expect = "L'\xc3\xa9cole";
                $this->assertEquals( $expect, UtfNormal::cleanUp( $text ) );
@@ -105,7 +108,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testAllBytes() {
+       public function testAllBytes() {
                $this->doTestBytes( '', '' );
                $this->doTestBytes( 'x', '' );
                $this->doTestBytes( '', 'x' );
@@ -145,7 +148,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testDoubleBytes() {
+       public function testDoubleBytes() {
                $this->doTestDoubleBytes( '', '' );
                $this->doTestDoubleBytes( 'x', '' );
                $this->doTestDoubleBytes( '', 'x' );
@@ -198,7 +201,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testTripleBytes() {
+       public function testTripleBytes() {
                $this->doTestTripleBytes( '', '' );
                $this->doTestTripleBytes( 'x', '' );
                $this->doTestTripleBytes( '', 'x' );
@@ -276,7 +279,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testChunkRegression() {
+       public function testChunkRegression() {
                # Check for regression against a chunking bug
                $text = "\x46\x55\xb8" .
                        "\xdc\x96" .
@@ -299,7 +302,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testInterposeRegression() {
+       public function testInterposeRegression() {
                $text = "\x4e\x30" .
                        "\xb1" . # bad tail
                        "\x3a" .
@@ -334,7 +337,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testOverlongRegression() {
+       public function testOverlongRegression() {
                $text = "\x67" .
                        "\x1a" . # forbidden ascii
                        "\xea" . # bad head
@@ -359,7 +362,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testSurrogateRegression() {
+       public function testSurrogateRegression() {
                $text = "\xed\xb4\x96" . # surrogate 0xDD16
                        "\x83" . # bad tail
                        "\xb4" . # bad tail
@@ -374,7 +377,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testBomRegression() {
+       public function testBomRegression() {
                $text = "\xef\xbf\xbe" . # U+FFFE, illegal char
                        "\xb2" . # bad tail
                        "\xef" . # bad head
@@ -389,7 +392,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testForbiddenRegression() {
+       public function testForbiddenRegression() {
                $text = "\xef\xbf\xbf"; # U+FFFF, illegal char
                $expect = "\xef\xbf\xbd";
                $this->assertEquals(
@@ -398,7 +401,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testHangulRegression() {
+       public function testHangulRegression() {
                $text = "\xed\x9c\xaf" . # Hangul char
                        "\xe1\x87\x81"; # followed by another final jamo
                $expect = $text; # Should *not* change.
index e90c630..eac4de5 100644 (file)
@@ -631,6 +631,7 @@ class NewParserTest extends MediaWikiTestCase {
                        $out = $parser->getPreloadText( $input, $title, $options );
                } else {
                        $output = $parser->parse( $input, $title, $options, true, true, 1337 );
+                       $output->setTOCEnabled( !isset( $opts['notoc'] ) );
                        $out = $output->getText();
 
                        if ( isset( $opts['showtitle'] ) ) {
@@ -672,7 +673,7 @@ class NewParserTest extends MediaWikiTestCase {
         *
         * @group ParserFuzz
         */
-       function testFuzzTests() {
+       public function testFuzzTests() {
                global $wgParserTestFiles;
 
                $files = $wgParserTestFiles;
index 0d2e07e..8aee937 100644 (file)
@@ -233,7 +233,7 @@ class PreprocessorTest extends MediaWikiTestCase {
         * @dataProvider provideHeadings
         * @covers Preprocessor_DOM::preprocessToXml
         */
-       function testHeadings( $wikiText, $expectedXml ) {
+       public function testHeadings( $wikiText, $expectedXml ) {
                $this->assertEquals( $this->normalizeXml( $expectedXml ), $this->preprocessToXml( $wikiText ) );
        }
 }
index ed60079..259a9e2 100644 (file)
@@ -20,8 +20,9 @@ class TagHookTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideValidNames
+        * @covers Parser::setHook
         */
-       function testTagHooks( $tag ) {
+       public function testTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
@@ -35,8 +36,9 @@ class TagHookTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideBadNames
         * @expectedException MWException
+        * @covers Parser::setHook
         */
-       function testBadTagHooks( $tag ) {
+       public function testBadTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
@@ -47,8 +49,9 @@ class TagHookTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideValidNames
+        * @covers Parser::setFunctionTagHook
         */
-       function testFunctionTagHooks( $tag ) {
+       public function testFunctionTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
@@ -62,8 +65,9 @@ class TagHookTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideBadNames
         * @expectedException MWException
+        * @covers Parser::setFunctionTagHook
         */
-       function testBadFunctionTagHooks( $tag ) {
+       public function testBadFunctionTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
index 8957a2f..e460591 100644 (file)
@@ -3,9 +3,16 @@
 /**
  * @group Search
  * @group Database
+ *
+ * @covers SearchEngine<extended>
+ * @note Coverage will only ever show one of on of the Search* classes
  */
 class SearchEngineTest extends MediaWikiLangTestCase {
-       protected $search, $pageList;
+       /**
+        * @var SearchEngine
+        */
+       protected $search;
+       protected $pageList;
 
        /**
         * Checks for database type & version.
@@ -115,7 +122,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                return true;
        }
 
-       function testFullWidth() {
+       public function testFullWidth() {
                $this->assertEquals(
                        array( 'FullOneUp', 'FullTwoLow', 'HalfOneUp', 'HalfTwoLow' ),
                        $this->fetchIds( $this->search->searchText( 'AZ' ) ),
@@ -134,14 +141,14 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        "Search for normalized from Full-width Lower" );
        }
 
-       function testTextSearch() {
+       public function testTextSearch() {
                $this->assertEquals(
                        array( 'Smithee' ),
                        $this->fetchIds( $this->search->searchText( 'smithee' ) ),
                        "Plain search failed" );
        }
 
-       function testTextPowerSearch() {
+       public function testTextPowerSearch() {
                $this->search->setNamespaces( array( 0, 1, 4 ) );
                $this->assertEquals(
                        array(
@@ -152,7 +159,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        "Power search failed" );
        }
 
-       function testTitleSearch() {
+       public function testTitleSearch() {
                $this->assertEquals(
                        array(
                                'Alan Smithee',
@@ -162,7 +169,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        "Title search failed" );
        }
 
-       function testTextTitlePowerSearch() {
+       public function testTextTitlePowerSearch() {
                $this->search->setNamespaces( array( 0, 1, 4 ) );
                $this->assertEquals(
                        array(
index e947c34..b913af8 100644 (file)
@@ -30,7 +30,10 @@ class SearchUpdateTest extends MediaWikiTestCase {
                return trim( SearchUpdate::updateText( $text ) );
        }
 
-       function testUpdateText() {
+       /**
+        * @covers SearchUpdate::updateText
+        */
+       public function testUpdateText() {
                $this->assertEquals(
                        'test',
                        $this->updateText( '<div>TeSt</div>' ),
@@ -62,7 +65,10 @@ EOT
                );
        }
 
-       function testBug32712() {
+       /**
+        * @covers SearchUpdate::updateText
+        */
+       public function testBug32712() {
                $text = "text „http://example.com“ text";
                $result = $this->updateText( $text );
                $processed = preg_replace( '/Q/u', 'Q', $result );
index 3b82e07..ba845eb 100644 (file)
@@ -15,6 +15,9 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 global $IP;
 require_once "$IP/includes/QueryPage.php"; // Needed to populate $wgQueryPages
 
+/**
+ * @covers QueryPage<extended>
+ */
 class QueryAllSpecialPagesTest extends MediaWikiTestCase {
 
        /** List query pages that can not be tested automatically */
@@ -51,7 +54,7 @@ class QueryAllSpecialPagesTest extends MediaWikiTestCase {
         * Test SQL for each of our QueryPages objects
         * @group Database
         */
-       function testQuerypageSqlQuery() {
+       public function testQuerypageSqlQuery() {
                global $wgDBtype;
 
                foreach ( $this->queryPages as $page ) {
index c7a4828..8a92daf 100644 (file)
@@ -7,6 +7,9 @@
  *
  */
 
+/**
+ * @covers SpecialPreferences
+ */
 class SpecialPreferencesTest extends MediaWikiTestCase {
 
        /**
@@ -15,7 +18,7 @@ class SpecialPreferencesTest extends MediaWikiTestCase {
         *
         * Test specifications by Alexandre "ialex" Emsenhuber.
         */
-       function testBug41337() {
+       public function testBug41337() {
 
                // Set a low limit
                $this->setMwGlobals( 'wgMaxSigChars', 2 );
index 436eb2e..b1ba152 100644 (file)
@@ -6,6 +6,8 @@
  *
  * @author Antoine Musso
  * @group Database
+ *
+ * @covers SpecialRecentChanges
  */
 class SpecialRecentchangesTest extends MediaWikiTestCase {
 
index c737f05..17e883f 100644 (file)
@@ -18,7 +18,7 @@ class SpecialSearchTest extends MediaWikiTestCase {
         * @param $expectedProfile An expected search profile name
         * @param $expectedNs Array Expected namespaces
         */
-       function testProfileAndNamespaceLoading(
+       public function testProfileAndNamespaceLoading(
                $requested, $userOptions, $expectedProfile, $expectedNS,
                $message = 'Profile name and namespaces mismatches!'
        ) {
@@ -112,7 +112,7 @@ class SpecialSearchTest extends MediaWikiTestCase {
         * Verify we do not expand search term in <title> on search result page
         * https://gerrit.wikimedia.org/r/4841
         */
-       function testSearchTermIsNotExpanded() {
+       public function testSearchTermIsNotExpanded() {
 
                # Initialize [[Special::Search]]
                $search = new SpecialSearch();
index a75fba6..e680632 100644 (file)
@@ -4,6 +4,8 @@
  * @group Broken
  * @group Upload
  * @group Database
+ *
+ * @covers UploadFromUrl
  */
 class UploadFromUrlTest extends ApiTestCase {
        protected function setUp() {
@@ -48,6 +50,8 @@ class UploadFromUrlTest extends ApiTestCase {
        /**
         * @todo Document why we test login, since the $wgUser hack used doesn't
         * require login
+        *
+        * @coversNothing
         */
        public function testLogin() {
                $data = $this->doApiRequest( array(
index 7a0fea4..1c89377 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 /**
  * @group Database
+ *
+ * @covers UploadStash
  */
 class UploadStashTest extends MediaWikiTestCase {
        /**
index 8fc2795..2c9905f 100644 (file)
@@ -16,6 +16,8 @@ class LanguageTrTest extends LanguageClassesTestCase {
         *  - Emperyan
         * @see http://en.wikipedia.org/wiki/Dotted_and_dotless_I
         * @dataProvider provideDottedAndDotlessI
+        * @covers Language::ucfirst
+        * @covers Language::lcfirst
         */
        public function testDottedAndDotlessI( $func, $input, $inputCase, $expected ) {
                if ( $func == 'ucfirst' ) {
index 3bf7414..7b3fb68 100644 (file)
@@ -4,6 +4,9 @@
  * @file
  */
 
+/**
+ * @covers CLDRPluralRuleEvaluator
+ */
 class CLDRPluralRuleEvaluatorTest extends MediaWikiTestCase {
        /**
         * @dataProvider validTestCases
index 318ce0d..83d7701 100644 (file)
@@ -130,6 +130,9 @@ class MaintenanceFixup extends Maintenance {
        }
 }
 
+/**
+ * @covers Maintenance
+ */
 class MaintenanceTest extends MediaWikiTestCase {
 
 
index bc2d737..0f36bc4 100644 (file)
@@ -6,6 +6,7 @@ require_once __DIR__ . "/../../../maintenance/backupPrefetch.inc";
  * Tests for BaseDump
  *
  * @group Dump
+ * @covers BaseDump
  */
 class BaseDumpTest extends MediaWikiTestCase {
 
index 653a114..15a928e 100644 (file)
@@ -7,6 +7,7 @@ require_once __DIR__ . "/../../../maintenance/backupTextPass.inc";
  *
  * @group Database
  * @group Dump
+ * @covers TextPassDumper
  */
 class TextPassDumperTest extends DumpTestCase {
 
index 98d8165..438281d 100644 (file)
@@ -4,6 +4,7 @@
  *
  * @group Database
  * @group Dump
+ * @covers BackupDumper
  */
 class BackupDumperLoggerTest extends DumpTestCase {
 
index 99bd270..c6094d9 100644 (file)
@@ -4,6 +4,7 @@
  *
  * @group Database
  * @group Dump
+ * @covers BackupDumper
  */
 class BackupDumperPageTest extends DumpTestCase {
 
index e8df199..42792d5 100644 (file)
@@ -70,6 +70,7 @@ class SemiMockedFetchText extends FetchText {
  *
  * @group Database
  * @group Dump
+ * @covers FetchText
  */
 class FetchTextTest extends MediaWikiTestCase {
 
index 2c84886..bb678af 100644 (file)
@@ -6,6 +6,7 @@ require_once __DIR__ . "/../../../maintenance/getSlaveServer.php";
  * Tests for getSlaveServer
  *
  * @group Database
+ * @covers GetSlaveServer
  */
 class GetSlaveServerTest extends MediaWikiTestCase {
 
index 850d39c..a385320 100644 (file)
@@ -5,7 +5,10 @@
  */
 class SideBarTest extends MediaWikiLangTestCase {
 
-       /** A skin template, reinitialized before each test */
+       /**
+        * A skin template, reinitialized before each test
+        * @var SkinTemplate
+        */
        private $skin;
        /** Local cache for sidebar messages */
        private $messages;
@@ -36,16 +39,12 @@ class SideBarTest extends MediaWikiLangTestCase {
                $this->skin->getContext()->setLanguage( Language::factory( 'en' ) );
        }
 
-       protected function tearDown() {
-               parent::tearDown();
-               $this->skin = null;
-       }
-
        /**
         * Internal helper to test the sidebar
         * @param $expected
         * @param $text
         * @param $message (Default: '')
+        * @todo this assert method to should be converted to a test using a dataprovider..
         */
        private function assertSideBar( $expected, $text, $message = '' ) {
                $bar = array();
@@ -53,7 +52,10 @@ class SideBarTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $bar, $message );
        }
 
-       function testSidebarWithOnlyTwoTitles() {
+       /**
+        * @covers SkinTemplate::addToSidebarPlain
+        */
+       public function testSidebarWithOnlyTwoTitles() {
                $this->assertSideBar(
                        array(
                                'Title1' => array(),
@@ -65,7 +67,10 @@ class SideBarTest extends MediaWikiLangTestCase {
                );
        }
 
-       function testExpandMessages() {
+       /**
+        * @covers SkinTemplate::addToSidebarPlain
+        */
+       public function testExpandMessages() {
                $this->assertSidebar(
                        array( 'Title' => array(
                                array(
@@ -81,7 +86,10 @@ class SideBarTest extends MediaWikiLangTestCase {
                );
        }
 
-       function testExternalUrlsRequireADescription() {
+       /**
+        * @covers SkinTemplate::addToSidebarPlain
+        */
+       public function testExternalUrlsRequireADescription() {
                $this->assertSidebar(
                        array( 'Title' => array(
                                # ** http://www.mediawiki.org/| Home
@@ -105,8 +113,9 @@ class SideBarTest extends MediaWikiLangTestCase {
        /**
         * bug 33321 - Make sure there's a | after transforming.
         * @group Database
+        * @covers SkinTemplate::addToSidebarPlain
         */
-       function testTrickyPipe() {
+       public function testTrickyPipe() {
                $this->assertSidebar(
                        array( 'Title' => array(
                                # The first 2 are skipped
@@ -151,7 +160,7 @@ class SideBarTest extends MediaWikiLangTestCase {
        /**
         * Simple test to verify our helper assertAttribs() is functional
         */
-       function testTestAttributesAssertionHelper() {
+       public function testTestAttributesAssertionHelper() {
                $this->setMwGlobals( array(
                        'wgNoFollowLinks' => true,
                        'wgExternalLinkTarget' => false,
@@ -167,7 +176,7 @@ class SideBarTest extends MediaWikiLangTestCase {
        /**
         * Test $wgNoFollowLinks in sidebar
         */
-       function testRespectWgnofollowlinks() {
+       public function testRespectWgnofollowlinks() {
                $this->setMwGlobals( 'wgNoFollowLinks', false );
 
                $attribs = $this->getAttribs();
@@ -180,7 +189,7 @@ class SideBarTest extends MediaWikiLangTestCase {
         * Test $wgExternaLinkTarget in sidebar
         * @dataProvider dataRespectExternallinktarget
         */
-       function testRespectExternallinktarget( $externalLinkTarget ) {
+       public function testRespectExternallinktarget( $externalLinkTarget ) {
                $this->setMwGlobals( 'wgExternalLinkTarget', $externalLinkTarget );
 
                $attribs = $this->getAttribs();
@@ -188,7 +197,7 @@ class SideBarTest extends MediaWikiLangTestCase {
                $this->assertEquals( $attribs['target'], $externalLinkTarget );
        }
 
-       function dataRespectExternallinktarget() {
+       public static function dataRespectExternallinktarget() {
                return array(
                        array( '_blank' ),
                        array( '_self' ),