From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- .../includes/api/format/ApiFormatTestBase.php | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 tests/phpunit/includes/api/format/ApiFormatTestBase.php (limited to 'tests/phpunit/includes/api/format/ApiFormatTestBase.php') diff --git a/tests/phpunit/includes/api/format/ApiFormatTestBase.php b/tests/phpunit/includes/api/format/ApiFormatTestBase.php deleted file mode 100644 index a0b7b020..00000000 --- a/tests/phpunit/includes/api/format/ApiFormatTestBase.php +++ /dev/null @@ -1,22 +0,0 @@ -createPrinterByName( $format ); - $printer->setUnescapeAmps( false ); - - $printer->initPrinter( false ); - - ob_start(); - $printer->execute(); - $out = ob_get_clean(); - - $printer->closePrinter(); - - return $out; - } -} -- cgit v1.2.3-54-g00ecf From 91e194556c52d2f354344f930419eef2dd6267f0 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 4 Sep 2013 05:51:59 +0200 Subject: Update to MediaWiki 1.21.2 --- .gitreview | 6 + .jshintignore | 27 + .jshintrc | 34 + RELEASE-NOTES-1.21 | 16 +- extensions/Cite/.gitreview | 5 + extensions/ConfirmEdit/.gitreview | 5 + extensions/ConfirmEdit/ReCaptcha.i18n.php | 3 +- extensions/Gadgets/.gitreview | 5 + extensions/Gadgets/tests/GadgetTest.php | 81 + extensions/ImageMap/.gitreview | 5 + extensions/InputBox/.gitreview | 5 + extensions/Interwiki/.gitreview | 6 + extensions/LocalisationUpdate/.gitreview | 5 + extensions/LocalisationUpdate/tests/tokenTest.php | 91 + extensions/Nuke/.gitreview | 5 + extensions/ParserFunctions/.gitreview | 5 + .../ParserFunctions/ParserFunctions.i18n.magic.php | 4 +- .../ParserFunctions/tests/ExpressionTest.php | 76 + extensions/PdfHandler/.gitreview | 5 + extensions/PdfHandler/PdfHandler_body.php | 2 +- extensions/Poem/.gitreview | 5 + extensions/Renameuser/.gitreview | 5 + extensions/SpamBlacklist/.gitreview | 5 + extensions/SyntaxHighlight_GeSHi/.gitreview | 5 + .../geshi/contrib/aliased.php | 123 - .../SyntaxHighlight_GeSHi/geshi/contrib/cssgen.php | 466 - .../geshi/contrib/cssgen2.php | 59 - .../geshi/contrib/example.php | 217 - .../geshi/contrib/langcheck.php | 769 - .../geshi/contrib/langwiz.php | 1158 -- extensions/TitleBlacklist/.gitreview | 5 + .../tests/ApiQueryTitleBlacklistTest.php | 110 + extensions/TitleBlacklist/tests/testSource | 4 + extensions/Vector/.gitreview | 5 + extensions/WikiEditor/.gitreview | 6 + extensions/WikiEditor/.jshintignore | 2 + extensions/WikiEditor/.jshintrc | 9 + .../tests/selenium/WikiDialogs_Links.php | 67 + .../tests/selenium/WikiDialogs_Links_Setup.php | 295 + .../tests/selenium/WikiEditorConstants.php | 84 + .../tests/selenium/WikiEditorSeleniumConfig.php | 27 + .../tests/selenium/WikiEditorTestSuite.php | 35 + includes/DefaultSettings.php | 2 +- includes/api/ApiBlock.php | 15 - includes/api/ApiCreateAccount.php | 4 + includes/api/ApiLogin.php | 9 + includes/api/ApiMain.php | 10 +- includes/api/ApiQueryDeletedrevs.php | 5 + includes/api/ApiTokens.php | 5 + includes/api/ApiUnblock.php | 15 - includes/filerepo/file/LocalFile.php | 16 + includes/installer/Installer.php | 29 +- includes/installer/MysqlUpdater.php | 2 +- includes/installer/WebInstallerPage.php | 2 +- includes/libs/IEUrlExtension.php | 2 +- includes/resourceloader/ResourceLoader.php | 26 +- includes/revisiondelete/RevisionDelete.php | 11 + includes/zhtable/trad2simp_supp_unset.manual | 0 .../language/zhtable/trad2simp_supp_unset.manual | 0 .../postgres/archives/patch-ipb_address_unique.sql | 0 skins/common/images/icons/fileicon-djvu.xcf | Bin 0 -> 83394 bytes skins/common/images/icons/fileicon-ogg.xcf | Bin 0 -> 40236 bytes tests/.htaccess | 1 + tests/RunSeleniumTests.php | 258 + tests/TestsAutoLoader.php | 104 + tests/parser/README | 8 + tests/parser/extraParserTests.txt | Bin 0 -> 1261 bytes tests/parser/parserTest.inc | 1349 ++ tests/parser/parserTests.txt | 13859 +++++++++++++++++++ tests/parser/parserTestsParserHook.php | 66 + .../parser/preprocess/All_system_messages.expected | 5646 ++++++++ tests/parser/preprocess/All_system_messages.txt | 5645 ++++++++ tests/parser/preprocess/Factorial.expected | 17 + tests/parser/preprocess/Factorial.txt | 16 + tests/parser/preprocess/Fundraising.expected | 18 + tests/parser/preprocess/Fundraising.txt | 17 + tests/parser/preprocess/NestedTemplates.expected | 90 + tests/parser/preprocess/NestedTemplates.txt | 89 + tests/parser/preprocess/QuoteQuran.expected | 140 + tests/parser/preprocess/QuoteQuran.txt | 139 + tests/parserTests.php | 94 + tests/phpunit/AutoLoaderTest.php | 51 + tests/phpunit/Makefile | 91 + tests/phpunit/MediaWikiLangTestCase.php | 29 + tests/phpunit/MediaWikiPHPUnitCommand.php | 101 + tests/phpunit/MediaWikiTestCase.php | 938 ++ tests/phpunit/README | 53 + tests/phpunit/StructureTest.php | 63 + tests/phpunit/TODO | 10 + tests/phpunit/bootstrap.php | 32 + tests/phpunit/data/db/mysql/functions.sql | 12 + tests/phpunit/data/db/postgres/functions.sql | 12 + tests/phpunit/data/db/sqlite/tables-1.13.sql | 342 + tests/phpunit/data/db/sqlite/tables-1.15.sql | 454 + tests/phpunit/data/db/sqlite/tables-1.16.sql | 483 + tests/phpunit/data/db/sqlite/tables-1.17.sql | 516 + tests/phpunit/data/db/sqlite/tables-1.18.sql | 535 + tests/phpunit/data/media/1bit-png.png | Bin 0 -> 167 bytes tests/phpunit/data/media/80x60-2layers.xcf | Bin 0 -> 1162 bytes tests/phpunit/data/media/80x60-Greyscale.xcf | Bin 0 -> 667 bytes tests/phpunit/data/media/80x60-RGB.xcf | Bin 0 -> 677 bytes .../Animated_PNG_example_bouncing_beach_ball.png | Bin 0 -> 72209 bytes tests/phpunit/data/media/Gtk-media-play-ltr.svg | 35 + tests/phpunit/data/media/Png-native-test.png | Bin 0 -> 4665 bytes tests/phpunit/data/media/QA_icon.svg | 77 + tests/phpunit/data/media/README | 38 + tests/phpunit/data/media/Toll_Texas_1.svg | 150 + .../media/US_states_by_total_state_tax_revenue.svg | 248 + tests/phpunit/data/media/Wikimedia-logo.svg | 14 + .../data/media/Xmp-exif-multilingual_test.jpg | Bin 0 -> 12544 bytes tests/phpunit/data/media/animated-xmp.gif | Bin 0 -> 3864 bytes tests/phpunit/data/media/animated.gif | Bin 0 -> 497 bytes tests/phpunit/data/media/broken_exif_date.jpg | Bin 0 -> 3233 bytes tests/phpunit/data/media/exif-gps.jpg | Bin 0 -> 665 bytes tests/phpunit/data/media/exif-user-comment.jpg | Bin 0 -> 484 bytes tests/phpunit/data/media/greyscale-na-png.png | Bin 0 -> 365 bytes tests/phpunit/data/media/greyscale-png.png | Bin 0 -> 415 bytes tests/phpunit/data/media/iptc-invalid-psir.jpg | Bin 0 -> 9574 bytes tests/phpunit/data/media/iptc-timetest-invalid.jpg | Bin 0 -> 9573 bytes tests/phpunit/data/media/iptc-timetest.jpg | Bin 0 -> 9573 bytes tests/phpunit/data/media/jpeg-comment-binary.jpg | Bin 0 -> 448 bytes .../phpunit/data/media/jpeg-comment-iso8859-1.jpg | Bin 0 -> 447 bytes tests/phpunit/data/media/jpeg-comment-multiple.jpg | Bin 0 -> 431 bytes tests/phpunit/data/media/jpeg-comment-utf.jpg | Bin 0 -> 445 bytes tests/phpunit/data/media/jpeg-iptc-bad-hash.jpg | Bin 0 -> 499 bytes tests/phpunit/data/media/jpeg-iptc-good-hash.jpg | Bin 0 -> 499 bytes tests/phpunit/data/media/jpeg-padding-even.jpg | Bin 0 -> 450 bytes tests/phpunit/data/media/jpeg-padding-odd.jpg | Bin 0 -> 451 bytes tests/phpunit/data/media/jpeg-xmp-alt.jpg | Bin 0 -> 3255 bytes tests/phpunit/data/media/jpeg-xmp-psir.jpg | Bin 0 -> 3308 bytes tests/phpunit/data/media/jpeg-xmp-psir.xmp | 35 + tests/phpunit/data/media/landscape-plain.jpg | Bin 0 -> 38771 bytes tests/phpunit/data/media/nonanimated.gif | Bin 0 -> 200 bytes tests/phpunit/data/media/portrait-rotated.jpg | Bin 0 -> 38577 bytes tests/phpunit/data/media/rgb-na-png.png | Bin 0 -> 593 bytes tests/phpunit/data/media/rgb-png.png | Bin 0 -> 663 bytes tests/phpunit/data/media/test.jpg | Bin 0 -> 437 bytes tests/phpunit/data/media/test.tiff | Bin 0 -> 566 bytes tests/phpunit/data/media/xmp.png | Bin 0 -> 582 bytes tests/phpunit/data/xmp/1.result.php | 8 + tests/phpunit/data/xmp/1.xmp | 11 + tests/phpunit/data/xmp/2.result.php | 8 + tests/phpunit/data/xmp/2.xmp | 12 + tests/phpunit/data/xmp/3-invalid.result.php | 7 + tests/phpunit/data/xmp/3-invalid.xmp | 31 + tests/phpunit/data/xmp/3.result.php | 8 + tests/phpunit/data/xmp/3.xmp | 29 + tests/phpunit/data/xmp/4.result.php | 7 + tests/phpunit/data/xmp/4.xmp | 22 + tests/phpunit/data/xmp/5.result.php | 7 + tests/phpunit/data/xmp/5.xmp | 16 + tests/phpunit/data/xmp/6.result.php | 8 + tests/phpunit/data/xmp/6.xmp | 18 + tests/phpunit/data/xmp/7.result.php | 52 + tests/phpunit/data/xmp/7.xmp | 67 + tests/phpunit/data/xmp/README | 3 + tests/phpunit/data/xmp/bag-for-seq.result.php | 10 + tests/phpunit/data/xmp/bag-for-seq.xmp | 1 + tests/phpunit/data/xmp/flash.result.php | 8 + tests/phpunit/data/xmp/flash.xmp | 11 + tests/phpunit/data/xmp/gps.result.php | 11 + tests/phpunit/data/xmp/gps.xmp | 17 + .../data/xmp/invalid-child-not-struct.result.php | 7 + .../phpunit/data/xmp/invalid-child-not-struct.xmp | 12 + tests/phpunit/data/xmp/no-namespace.result.php | 7 + tests/phpunit/data/xmp/no-namespace.xmp | 11 + .../data/xmp/no-recognized-props.result.php | 2 + tests/phpunit/data/xmp/no-recognized-props.xmp | 8 + tests/phpunit/data/xmp/utf16BE.result.php | 12 + tests/phpunit/data/xmp/utf16BE.xmp | Bin 0 -> 930 bytes tests/phpunit/data/xmp/utf16LE.result.php | 12 + tests/phpunit/data/xmp/utf16LE.xmp | Bin 0 -> 930 bytes tests/phpunit/data/xmp/utf32BE.result.php | 12 + tests/phpunit/data/xmp/utf32BE.xmp | Bin 0 -> 1856 bytes tests/phpunit/data/xmp/utf32LE.result.php | 12 + tests/phpunit/data/xmp/utf32LE.xmp | Bin 0 -> 1856 bytes tests/phpunit/data/xmp/xmpExt.result.php | 8 + tests/phpunit/data/xmp/xmpExt.xmp | 13 + tests/phpunit/data/xmp/xmpExt2.xmp | 8 + tests/phpunit/data/zip/cd-gap.zip | Bin 0 -> 182 bytes tests/phpunit/data/zip/cd-truncated.zip | Bin 0 -> 171 bytes tests/phpunit/data/zip/class-trailing-null.zip | Bin 0 -> 173 bytes tests/phpunit/data/zip/class-trailing-slash.zip | Bin 0 -> 173 bytes tests/phpunit/data/zip/class.zip | Bin 0 -> 173 bytes tests/phpunit/data/zip/empty.zip | Bin 0 -> 22 bytes tests/phpunit/data/zip/looks-like-zip64.zip | Bin 0 -> 173 bytes tests/phpunit/data/zip/nosig.zip | Bin 0 -> 173 bytes tests/phpunit/data/zip/split.zip | Bin 0 -> 196 bytes tests/phpunit/data/zip/trail.zip | Bin 0 -> 181 bytes tests/phpunit/data/zip/wrong-cd-start-disk.zip | Bin 0 -> 173 bytes tests/phpunit/data/zip/wrong-central-entry-sig.zip | Bin 0 -> 173 bytes tests/phpunit/docs/ExportDemoTest.php | 39 + tests/phpunit/includes/ArticleTablesTest.php | 33 + tests/phpunit/includes/ArticleTest.php | 92 + tests/phpunit/includes/BlockTest.php | 231 + tests/phpunit/includes/CdbTest.php | 88 + tests/phpunit/includes/CollationTest.php | 109 + tests/phpunit/includes/DiffHistoryBlobTest.php | 41 + tests/phpunit/includes/EditPageTest.php | 416 + tests/phpunit/includes/ExternalStoreTest.php | 81 + tests/phpunit/includes/ExtraParserTest.php | 158 + tests/phpunit/includes/FauxResponseTest.php | 71 + .../includes/FormOptionsInitializationTest.php | 85 + tests/phpunit/includes/FormOptionsTest.php | 91 + .../includes/GlobalFunctions/GlobalTest.php | 679 + .../includes/GlobalFunctions/GlobalWithDBTest.php | 29 + tests/phpunit/includes/GlobalFunctions/README | 2 + .../includes/GlobalFunctions/wfAssembleUrlTest.php | 110 + .../includes/GlobalFunctions/wfBCP47Test.php | 134 + .../includes/GlobalFunctions/wfBaseConvertTest.php | 181 + .../includes/GlobalFunctions/wfBaseNameTest.php | 36 + .../includes/GlobalFunctions/wfExpandUrlTest.php | 113 + .../includes/GlobalFunctions/wfGetCallerTest.php | 35 + .../includes/GlobalFunctions/wfParseUrlTest.php | 143 + .../GlobalFunctions/wfRemoveDotSegmentsTest.php | 89 + .../GlobalFunctions/wfShorthandToIntegerTest.php | 28 + .../includes/GlobalFunctions/wfTimestampTest.php | 133 + .../includes/GlobalFunctions/wfUrlencodeTest.php | 116 + tests/phpunit/includes/HooksTest.php | 137 + tests/phpunit/includes/HtmlTest.php | 620 + tests/phpunit/includes/HttpTest.php | 213 + tests/phpunit/includes/IPTest.php | 541 + tests/phpunit/includes/JsonTest.php | 27 + tests/phpunit/includes/LanguageConverterTest.php | 135 + tests/phpunit/includes/LicensesTest.php | 22 + tests/phpunit/includes/LinkerTest.php | 71 + tests/phpunit/includes/LinksUpdateTest.php | 164 + tests/phpunit/includes/LocalFileTest.php | 107 + tests/phpunit/includes/LocalisationCacheTest.php | 31 + tests/phpunit/includes/MWFunctionTest.php | 75 + tests/phpunit/includes/MWNamespaceTest.php | 574 + tests/phpunit/includes/MessageTest.php | 74 + tests/phpunit/includes/OutputPageTest.php | 172 + tests/phpunit/includes/PathRouterTest.php | 255 + tests/phpunit/includes/PreferencesTest.php | 82 + tests/phpunit/includes/Providers.php | 44 + tests/phpunit/includes/RecentChangeTest.php | 280 + tests/phpunit/includes/RequestContextTest.php | 69 + tests/phpunit/includes/ResourceLoaderTest.php | 91 + tests/phpunit/includes/RevisionStorageTest.php | 546 + .../RevisionStorageTest_ContentHandlerUseDB.php | 95 + tests/phpunit/includes/RevisionTest.php | 445 + tests/phpunit/includes/SampleTest.php | 105 + tests/phpunit/includes/SanitizerTest.php | 250 + .../includes/SanitizerValidateEmailTest.php | 96 + .../phpunit/includes/SeleniumConfigurationTest.php | 222 + tests/phpunit/includes/SiteConfigurationTest.php | 312 + tests/phpunit/includes/StringUtilsTest.php | 143 + tests/phpunit/includes/TemplateCategoriesTest.php | 37 + tests/phpunit/includes/TestUser.php | 58 + tests/phpunit/includes/TimeAdjustTest.php | 45 + tests/phpunit/includes/TimestampTest.php | 86 + tests/phpunit/includes/TitleMethodsTest.php | 290 + tests/phpunit/includes/TitlePermissionTest.php | 662 + tests/phpunit/includes/TitleTest.php | 329 + tests/phpunit/includes/UIDGeneratorTest.php | 76 + tests/phpunit/includes/UserTest.php | 217 + tests/phpunit/includes/WebRequestTest.php | 220 + tests/phpunit/includes/WikiPageTest.php | 1018 ++ .../includes/WikiPageTest_ContentHandlerUseDB.php | 62 + tests/phpunit/includes/XmlJsTest.php | 9 + tests/phpunit/includes/XmlSelectTest.php | 150 + tests/phpunit/includes/XmlTest.php | 336 + tests/phpunit/includes/ZipDirectoryReaderTest.php | 80 + .../includes/api/ApiAccountCreationTest.php | 153 + tests/phpunit/includes/api/ApiBlockTest.php | 118 + tests/phpunit/includes/api/ApiEditPageTest.php | 352 + tests/phpunit/includes/api/ApiOptionsTest.php | 412 + tests/phpunit/includes/api/ApiParseTest.php | 30 + tests/phpunit/includes/api/ApiPurgeTest.php | 41 + tests/phpunit/includes/api/ApiTest.php | 266 + tests/phpunit/includes/api/ApiTestCase.php | 239 + tests/phpunit/includes/api/ApiTestCaseUpload.php | 149 + tests/phpunit/includes/api/ApiUploadTest.php | 565 + tests/phpunit/includes/api/ApiWatchTest.php | 177 + .../phpunit/includes/api/PrefixUniquenessTest.php | 25 + .../phpunit/includes/api/RandomImageGenerator.php | 465 + .../includes/api/format/ApiFormatPhpTest.php | 19 + .../includes/api/format/ApiFormatTestBase.php | 22 + .../phpunit/includes/api/generateRandomImages.php | 46 + .../includes/api/query/ApiQueryBasicTest.php | 348 + .../includes/api/query/ApiQueryContinue2Test.php | 68 + .../includes/api/query/ApiQueryContinueTest.php | 313 + .../api/query/ApiQueryContinueTestBase.php | 203 + .../includes/api/query/ApiQueryRevisionsTest.php | 39 + tests/phpunit/includes/api/query/ApiQueryTest.php | 69 + .../includes/api/query/ApiQueryTestBase.php | 149 + tests/phpunit/includes/api/words.txt | 1000 ++ tests/phpunit/includes/cache/GenderCacheTest.php | 101 + .../phpunit/includes/cache/ProcessCacheLRUTest.php | 239 + .../includes/content/ContentHandlerTest.php | 424 + tests/phpunit/includes/content/CssContentTest.php | 81 + .../includes/content/JavaScriptContentTest.php | 273 + tests/phpunit/includes/content/TextContentTest.php | 431 + .../content/WikitextContentHandlerTest.php | 185 + .../includes/content/WikitextContentTest.php | 386 + tests/phpunit/includes/db/DatabaseSQLTest.php | 148 + tests/phpunit/includes/db/DatabaseSqliteTest.php | 389 + tests/phpunit/includes/db/DatabaseTest.php | 212 + tests/phpunit/includes/db/ORMRowTest.php | 225 + tests/phpunit/includes/db/ORMTableTest.php | 146 + tests/phpunit/includes/db/TestORMRowTest.php | 199 + tests/phpunit/includes/debug/MWDebugTest.php | 72 + .../includes/filebackend/FileBackendTest.php | 2189 +++ tests/phpunit/includes/filerepo/FileRepoTest.php | 48 + tests/phpunit/includes/filerepo/StoreBatchTest.php | 123 + .../includes/installer/InstallDocFormatterTest.php | 64 + tests/phpunit/includes/jobqueue/JobQueueTest.php | 292 + tests/phpunit/includes/json/ServicesJsonTest.php | 93 + tests/phpunit/includes/libs/CSSJanusTest.php | 560 + tests/phpunit/includes/libs/CSSMinTest.php | 133 + .../includes/libs/GenericArrayObjectTest.php | 262 + tests/phpunit/includes/libs/IEUrlExtensionTest.php | 126 + .../includes/libs/JavaScriptMinifierTest.php | 170 + .../phpunit/includes/logging/LogFormatterTest.php | 207 + tests/phpunit/includes/logging/LogTests.i18n.php | 15 + .../includes/media/BitmapMetadataHandlerTest.php | 152 + tests/phpunit/includes/media/BitmapScalingTest.php | 154 + tests/phpunit/includes/media/ExifBitmapTest.php | 104 + tests/phpunit/includes/media/ExifRotationTest.php | 261 + tests/phpunit/includes/media/ExifTest.php | 44 + .../phpunit/includes/media/FormatMetadataTest.php | 50 + .../includes/media/GIFMetadataExtractorTest.php | 106 + tests/phpunit/includes/media/GIFTest.php | 104 + tests/phpunit/includes/media/IPTCTest.php | 60 + .../includes/media/JpegMetadataExtractorTest.php | 106 + tests/phpunit/includes/media/JpegTest.php | 29 + tests/phpunit/includes/media/MediaHandlerTest.php | 48 + .../includes/media/PNGMetadataExtractorTest.php | 153 + tests/phpunit/includes/media/PNGTest.php | 107 + .../includes/media/SVGMetadataExtractorTest.php | 107 + tests/phpunit/includes/media/TiffTest.php | 31 + tests/phpunit/includes/media/XMPTest.php | 161 + tests/phpunit/includes/media/XMPValidateTest.php | 47 + tests/phpunit/includes/normal/CleanUpTest.php | 405 + .../phpunit/includes/objectcache/BagOStuffTest.php | 138 + .../phpunit/includes/parser/MagicVariableTest.php | 219 + .../includes/parser/MediaWikiParserTest.php | 34 + tests/phpunit/includes/parser/NewParserTest.php | 914 ++ .../phpunit/includes/parser/ParserMethodsTest.php | 49 + tests/phpunit/includes/parser/ParserOutputTest.php | 55 + .../phpunit/includes/parser/ParserPreloadTest.php | 72 + tests/phpunit/includes/parser/PreprocessorTest.php | 229 + tests/phpunit/includes/parser/TagHooksTest.php | 82 + tests/phpunit/includes/search/SearchEngineTest.php | 176 + tests/phpunit/includes/search/SearchUpdateTest.php | 81 + tests/phpunit/includes/site/MediaWikiSiteTest.php | 89 + tests/phpunit/includes/site/SiteListTest.php | 190 + tests/phpunit/includes/site/SiteSQLStoreTest.php | 123 + tests/phpunit/includes/site/SiteTest.php | 267 + tests/phpunit/includes/site/TestSites.php | 101 + .../includes/specials/QueryAllSpecialPagesTest.php | 79 + .../includes/specials/SpecialRecentchangesTest.php | 127 + .../includes/specials/SpecialSearchTest.php | 140 + .../phpunit/includes/upload/UploadFromUrlTest.php | 352 + tests/phpunit/includes/upload/UploadStashTest.php | 77 + tests/phpunit/includes/upload/UploadTest.php | 144 + tests/phpunit/install-phpunit.sh | 37 + tests/phpunit/languages/LanguageAmTest.php | 25 + tests/phpunit/languages/LanguageArTest.php | 72 + tests/phpunit/languages/LanguageBeTest.php | 32 + tests/phpunit/languages/LanguageBe_taraskTest.php | 73 + tests/phpunit/languages/LanguageBhoTest.php | 26 + tests/phpunit/languages/LanguageBsTest.php | 33 + .../phpunit/languages/LanguageClassesTestCase.php | 100 + tests/phpunit/languages/LanguageCsTest.php | 32 + tests/phpunit/languages/LanguageCuTest.php | 33 + tests/phpunit/languages/LanguageCyTest.php | 34 + tests/phpunit/languages/LanguageDsbTest.php | 32 + tests/phpunit/languages/LanguageFrTest.php | 26 + tests/phpunit/languages/LanguageGaTest.php | 26 + tests/phpunit/languages/LanguageGdTest.php | 48 + tests/phpunit/languages/LanguageGvTest.php | 32 + tests/phpunit/languages/LanguageHeTest.php | 77 + tests/phpunit/languages/LanguageHiTest.php | 26 + tests/phpunit/languages/LanguageHrTest.php | 33 + tests/phpunit/languages/LanguageHsbTest.php | 32 + tests/phpunit/languages/LanguageHuTest.php | 26 + tests/phpunit/languages/LanguageHyTest.php | 26 + tests/phpunit/languages/LanguageKshTest.php | 26 + tests/phpunit/languages/LanguageLnTest.php | 26 + tests/phpunit/languages/LanguageLtTest.php | 45 + tests/phpunit/languages/LanguageLvTest.php | 31 + tests/phpunit/languages/LanguageMgTest.php | 27 + tests/phpunit/languages/LanguageMkTest.php | 33 + tests/phpunit/languages/LanguageMlTest.php | 35 + tests/phpunit/languages/LanguageMoTest.php | 35 + tests/phpunit/languages/LanguageMtTest.php | 64 + tests/phpunit/languages/LanguageNlTest.php | 20 + tests/phpunit/languages/LanguageNsoTest.php | 24 + tests/phpunit/languages/LanguagePlTest.php | 64 + tests/phpunit/languages/LanguageRoTest.php | 35 + tests/phpunit/languages/LanguageRuTest.php | 78 + tests/phpunit/languages/LanguageSeTest.php | 40 + tests/phpunit/languages/LanguageSgsTest.php | 58 + tests/phpunit/languages/LanguageShTest.php | 24 + tests/phpunit/languages/LanguageSkTest.php | 32 + tests/phpunit/languages/LanguageSlTest.php | 34 + tests/phpunit/languages/LanguageSmaTest.php | 40 + tests/phpunit/languages/LanguageSrTest.php | 219 + tests/phpunit/languages/LanguageTest.php | 1352 ++ tests/phpunit/languages/LanguageTiTest.php | 24 + tests/phpunit/languages/LanguageTlTest.php | 24 + tests/phpunit/languages/LanguageTrTest.php | 60 + tests/phpunit/languages/LanguageUkTest.php | 48 + tests/phpunit/languages/LanguageUzTest.php | 115 + tests/phpunit/languages/LanguageWaTest.php | 24 + .../utils/CLDRPluralRuleEvaluatorTest.php | 95 + tests/phpunit/maintenance/DumpTestCase.php | 377 + tests/phpunit/maintenance/MaintenanceTest.php | 820 ++ tests/phpunit/maintenance/backupPrefetchTest.php | 278 + tests/phpunit/maintenance/backupTextPassTest.php | 584 + tests/phpunit/maintenance/backup_LogTest.php | 230 + tests/phpunit/maintenance/backup_PageTest.php | 408 + tests/phpunit/maintenance/fetchTextTest.php | 240 + tests/phpunit/maintenance/getSlaveServerTest.php | 69 + tests/phpunit/phpunit.php | 111 + tests/phpunit/resources/ResourcesTest.php | 128 + tests/phpunit/run-tests.bat | 1 + tests/phpunit/skins/SideBarTest.php | 205 + tests/phpunit/suite.xml | 50 + tests/phpunit/suites/ExtensionsTestSuite.php | 33 + tests/phpunit/suites/UploadFromUrlTestSuite.php | 206 + tests/qunit/.htaccess | 1 + tests/qunit/QUnitTestResources.php | 66 + tests/qunit/data/callMwLoaderTestCallback.js | 1 + tests/qunit/data/generateJqueryMsgData.php | 150 + tests/qunit/data/load.mock.php | 58 + tests/qunit/data/mediawiki.jqueryMsg.data.js | 492 + tests/qunit/data/qunitOkCall.js | 2 + tests/qunit/data/styleTest.css.php | 61 + tests/qunit/data/testrunner.js | 408 + .../resources/jquery/jquery.autoEllipsis.test.js | 58 + .../resources/jquery/jquery.byteLength.test.js | 35 + .../resources/jquery/jquery.byteLimit.test.js | 258 + .../suites/resources/jquery/jquery.client.test.js | 375 + .../resources/jquery/jquery.colorUtil.test.js | 63 + .../resources/jquery/jquery.delayedBind.test.js | 37 + .../resources/jquery/jquery.getAttrs.test.js | 13 + .../suites/resources/jquery/jquery.hidpi.test.js | 22 + .../resources/jquery/jquery.highlightText.test.js | 235 + .../resources/jquery/jquery.localize.test.js | 135 + .../resources/jquery/jquery.mwExtension.test.js | 57 + .../resources/jquery/jquery.tabIndex.test.js | 35 + .../resources/jquery/jquery.tablesorter.test.js | 1128 ++ .../resources/jquery/jquery.textSelection.test.js | 282 + .../mediawiki.api/mediawiki.api.parse.test.js | 28 + .../resources/mediawiki.api/mediawiki.api.test.js | 61 + .../mediawiki.special.recentchanges.test.js | 63 + .../resources/mediawiki/mediawiki.Title.test.js | 198 + .../resources/mediawiki/mediawiki.Uri.test.js | 433 + .../resources/mediawiki/mediawiki.cldr.test.js | 81 + .../mediawiki/mediawiki.jqueryMsg.test.js | 599 + .../resources/mediawiki/mediawiki.jscompat.test.js | 70 + .../resources/mediawiki/mediawiki.language.test.js | 443 + .../suites/resources/mediawiki/mediawiki.test.js | 765 + .../resources/mediawiki/mediawiki.user.test.js | 53 + .../resources/mediawiki/mediawiki.util.test.js | 303 + tests/selenium/Selenium.php | 191 + tests/selenium/SeleniumConfig.php | 80 + tests/selenium/SeleniumLoader.php | 9 + tests/selenium/SeleniumServerManager.php | 252 + tests/selenium/SeleniumTestCase.php | 127 + tests/selenium/SeleniumTestConsoleLogger.php | 25 + tests/selenium/SeleniumTestConstants.php | 24 + tests/selenium/SeleniumTestHTMLLogger.php | 36 + tests/selenium/SeleniumTestListener.php | 65 + tests/selenium/SeleniumTestSuite.php | 57 + tests/selenium/data/SimpleSeleniumTestDB.sql | 1453 ++ tests/selenium/data/SimpleSeleniumTestImages.zip | Bin 0 -> 21993 bytes tests/selenium/data/Wikipedia-logo-v2-de.png | Bin 0 -> 21479 bytes .../data/mediawiki118_fresh_installation.sql | 1543 +++ .../MediaWikiButtonsAvailabilityTestCase.php | 90 + .../MediaWikiDifferentDatabaseAccountTestCase.php | 73 + .../MediaWikiDifferntDatabasePrefixTestCase.php | 88 + ...ediaWikiErrorsConnectToDatabasePageTestCase.php | 131 + .../installer/MediaWikiErrorsNamepageTestCase.php | 119 + .../installer/MediaWikiHelpFieldHintTestCase.php | 128 + .../MediaWikiInstallationCommonFunction.php | 259 + .../installer/MediaWikiInstallationConfig.php | 45 + .../installer/MediaWikiInstallationMessage.php | 53 + .../installer/MediaWikiInstallationVariables.php | 73 + .../installer/MediaWikiInstallerTestSuite.php | 49 + .../installer/MediaWikiMySQLDataBaseTestCase.php | 71 + .../MediaWikiMySQLiteDataBaseTestCase.php | 73 + .../MediaWikiOnAlreadyInstalledTestCase.php | 65 + .../MediaWikiRestartInstallationTestCase.php | 104 + .../MediaWikiRightFrameworkLinksTestCase.php | 83 + .../MediaWikiUpgradeExistingDatabaseTestCase.php | 111 + .../installer/MediaWikiUserInterfaceTestCase.php | 494 + tests/selenium/installer/README.txt | 32 + tests/selenium/selenium_settings.ini.sample | 32 + tests/selenium/selenium_settings_grid.ini.sample | 16 + .../suites/AddContentToNewPageTestCase.php | 173 + tests/selenium/suites/AddNewPageTestCase.php | 59 + tests/selenium/suites/CreateAccountTestCase.php | 109 + tests/selenium/suites/DeletePageAdminTestCase.php | 82 + tests/selenium/suites/EmailPasswordTestCase.php | 74 + tests/selenium/suites/MediaWikiEditorConfig.php | 41 + tests/selenium/suites/MediaWikiEditorTestSuite.php | 19 + tests/selenium/suites/MediaWikiExtraTestSuite.php | 21 + .../selenium/suites/MediawikiCoreSmokeTestCase.php | 70 + .../suites/MediawikiCoreSmokeTestSuite.php | 19 + tests/selenium/suites/MovePageTestCase.php | 111 + tests/selenium/suites/MyContributionsTestCase.php | 59 + tests/selenium/suites/MyWatchListTestCase.php | 51 + tests/selenium/suites/PageDeleteTestSuite.php | 15 + tests/selenium/suites/PageSearchTestCase.php | 98 + tests/selenium/suites/PreviewPageTestCase.php | 48 + tests/selenium/suites/SavePageTestCase.php | 53 + tests/selenium/suites/SimpleSeleniumConfig.php | 30 + tests/selenium/suites/SimpleSeleniumTestCase.php | 39 + tests/selenium/suites/SimpleSeleniumTestSuite.php | 26 + tests/selenium/suites/UserPreferencesTestCase.php | 170 + tests/testHelpers.inc | 604 + 515 files changed, 88029 insertions(+), 2855 deletions(-) create mode 100644 .gitreview create mode 100644 .jshintignore create mode 100644 .jshintrc create mode 100644 extensions/Cite/.gitreview create mode 100644 extensions/ConfirmEdit/.gitreview create mode 100644 extensions/Gadgets/.gitreview create mode 100644 extensions/Gadgets/tests/GadgetTest.php create mode 100644 extensions/ImageMap/.gitreview create mode 100644 extensions/InputBox/.gitreview create mode 100644 extensions/Interwiki/.gitreview create mode 100644 extensions/LocalisationUpdate/.gitreview create mode 100644 extensions/LocalisationUpdate/tests/tokenTest.php create mode 100644 extensions/Nuke/.gitreview create mode 100644 extensions/ParserFunctions/.gitreview create mode 100644 extensions/ParserFunctions/tests/ExpressionTest.php create mode 100644 extensions/PdfHandler/.gitreview create mode 100644 extensions/Poem/.gitreview create mode 100644 extensions/Renameuser/.gitreview create mode 100644 extensions/SpamBlacklist/.gitreview create mode 100644 extensions/SyntaxHighlight_GeSHi/.gitreview delete mode 100644 extensions/SyntaxHighlight_GeSHi/geshi/contrib/aliased.php delete mode 100644 extensions/SyntaxHighlight_GeSHi/geshi/contrib/cssgen.php delete mode 100644 extensions/SyntaxHighlight_GeSHi/geshi/contrib/cssgen2.php delete mode 100644 extensions/SyntaxHighlight_GeSHi/geshi/contrib/example.php delete mode 100644 extensions/SyntaxHighlight_GeSHi/geshi/contrib/langcheck.php delete mode 100644 extensions/SyntaxHighlight_GeSHi/geshi/contrib/langwiz.php create mode 100644 extensions/TitleBlacklist/.gitreview create mode 100644 extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php create mode 100644 extensions/TitleBlacklist/tests/testSource create mode 100644 extensions/Vector/.gitreview create mode 100644 extensions/WikiEditor/.gitreview create mode 100644 extensions/WikiEditor/.jshintignore create mode 100644 extensions/WikiEditor/.jshintrc create mode 100644 extensions/WikiEditor/tests/selenium/WikiDialogs_Links.php create mode 100644 extensions/WikiEditor/tests/selenium/WikiDialogs_Links_Setup.php create mode 100644 extensions/WikiEditor/tests/selenium/WikiEditorConstants.php create mode 100644 extensions/WikiEditor/tests/selenium/WikiEditorSeleniumConfig.php create mode 100644 extensions/WikiEditor/tests/selenium/WikiEditorTestSuite.php delete mode 100644 includes/zhtable/trad2simp_supp_unset.manual create mode 100644 maintenance/language/zhtable/trad2simp_supp_unset.manual delete mode 100644 maintenance/postgres/archives/patch-ipb_address_unique.sql create mode 100644 skins/common/images/icons/fileicon-djvu.xcf create mode 100644 skins/common/images/icons/fileicon-ogg.xcf create mode 100644 tests/.htaccess create mode 100644 tests/RunSeleniumTests.php create mode 100644 tests/TestsAutoLoader.php create mode 100644 tests/parser/README create mode 100644 tests/parser/extraParserTests.txt create mode 100644 tests/parser/parserTest.inc create mode 100644 tests/parser/parserTests.txt create mode 100644 tests/parser/parserTestsParserHook.php create mode 100644 tests/parser/preprocess/All_system_messages.expected create mode 100644 tests/parser/preprocess/All_system_messages.txt create mode 100644 tests/parser/preprocess/Factorial.expected create mode 100644 tests/parser/preprocess/Factorial.txt create mode 100644 tests/parser/preprocess/Fundraising.expected create mode 100644 tests/parser/preprocess/Fundraising.txt create mode 100644 tests/parser/preprocess/NestedTemplates.expected create mode 100644 tests/parser/preprocess/NestedTemplates.txt create mode 100644 tests/parser/preprocess/QuoteQuran.expected create mode 100644 tests/parser/preprocess/QuoteQuran.txt create mode 100644 tests/parserTests.php create mode 100644 tests/phpunit/AutoLoaderTest.php create mode 100644 tests/phpunit/Makefile create mode 100644 tests/phpunit/MediaWikiLangTestCase.php create mode 100644 tests/phpunit/MediaWikiPHPUnitCommand.php create mode 100644 tests/phpunit/MediaWikiTestCase.php create mode 100644 tests/phpunit/README create mode 100644 tests/phpunit/StructureTest.php create mode 100644 tests/phpunit/TODO create mode 100644 tests/phpunit/bootstrap.php create mode 100644 tests/phpunit/data/db/mysql/functions.sql create mode 100644 tests/phpunit/data/db/postgres/functions.sql create mode 100644 tests/phpunit/data/db/sqlite/tables-1.13.sql create mode 100644 tests/phpunit/data/db/sqlite/tables-1.15.sql create mode 100644 tests/phpunit/data/db/sqlite/tables-1.16.sql create mode 100644 tests/phpunit/data/db/sqlite/tables-1.17.sql create mode 100644 tests/phpunit/data/db/sqlite/tables-1.18.sql create mode 100644 tests/phpunit/data/media/1bit-png.png create mode 100644 tests/phpunit/data/media/80x60-2layers.xcf create mode 100644 tests/phpunit/data/media/80x60-Greyscale.xcf create mode 100644 tests/phpunit/data/media/80x60-RGB.xcf create mode 100644 tests/phpunit/data/media/Animated_PNG_example_bouncing_beach_ball.png create mode 100644 tests/phpunit/data/media/Gtk-media-play-ltr.svg create mode 100644 tests/phpunit/data/media/Png-native-test.png create mode 100644 tests/phpunit/data/media/QA_icon.svg create mode 100644 tests/phpunit/data/media/README create mode 100644 tests/phpunit/data/media/Toll_Texas_1.svg create mode 100644 tests/phpunit/data/media/US_states_by_total_state_tax_revenue.svg create mode 100644 tests/phpunit/data/media/Wikimedia-logo.svg create mode 100644 tests/phpunit/data/media/Xmp-exif-multilingual_test.jpg create mode 100644 tests/phpunit/data/media/animated-xmp.gif create mode 100644 tests/phpunit/data/media/animated.gif create mode 100644 tests/phpunit/data/media/broken_exif_date.jpg create mode 100644 tests/phpunit/data/media/exif-gps.jpg create mode 100644 tests/phpunit/data/media/exif-user-comment.jpg create mode 100644 tests/phpunit/data/media/greyscale-na-png.png create mode 100644 tests/phpunit/data/media/greyscale-png.png create mode 100644 tests/phpunit/data/media/iptc-invalid-psir.jpg create mode 100644 tests/phpunit/data/media/iptc-timetest-invalid.jpg create mode 100644 tests/phpunit/data/media/iptc-timetest.jpg create mode 100644 tests/phpunit/data/media/jpeg-comment-binary.jpg create mode 100644 tests/phpunit/data/media/jpeg-comment-iso8859-1.jpg create mode 100644 tests/phpunit/data/media/jpeg-comment-multiple.jpg create mode 100644 tests/phpunit/data/media/jpeg-comment-utf.jpg create mode 100644 tests/phpunit/data/media/jpeg-iptc-bad-hash.jpg create mode 100644 tests/phpunit/data/media/jpeg-iptc-good-hash.jpg create mode 100644 tests/phpunit/data/media/jpeg-padding-even.jpg create mode 100644 tests/phpunit/data/media/jpeg-padding-odd.jpg create mode 100644 tests/phpunit/data/media/jpeg-xmp-alt.jpg create mode 100644 tests/phpunit/data/media/jpeg-xmp-psir.jpg create mode 100644 tests/phpunit/data/media/jpeg-xmp-psir.xmp create mode 100644 tests/phpunit/data/media/landscape-plain.jpg create mode 100644 tests/phpunit/data/media/nonanimated.gif create mode 100644 tests/phpunit/data/media/portrait-rotated.jpg create mode 100644 tests/phpunit/data/media/rgb-na-png.png create mode 100644 tests/phpunit/data/media/rgb-png.png create mode 100644 tests/phpunit/data/media/test.jpg create mode 100644 tests/phpunit/data/media/test.tiff create mode 100644 tests/phpunit/data/media/xmp.png create mode 100644 tests/phpunit/data/xmp/1.result.php create mode 100644 tests/phpunit/data/xmp/1.xmp create mode 100644 tests/phpunit/data/xmp/2.result.php create mode 100644 tests/phpunit/data/xmp/2.xmp create mode 100644 tests/phpunit/data/xmp/3-invalid.result.php create mode 100644 tests/phpunit/data/xmp/3-invalid.xmp create mode 100644 tests/phpunit/data/xmp/3.result.php create mode 100644 tests/phpunit/data/xmp/3.xmp create mode 100644 tests/phpunit/data/xmp/4.result.php create mode 100644 tests/phpunit/data/xmp/4.xmp create mode 100644 tests/phpunit/data/xmp/5.result.php create mode 100644 tests/phpunit/data/xmp/5.xmp create mode 100644 tests/phpunit/data/xmp/6.result.php create mode 100644 tests/phpunit/data/xmp/6.xmp create mode 100644 tests/phpunit/data/xmp/7.result.php create mode 100644 tests/phpunit/data/xmp/7.xmp create mode 100644 tests/phpunit/data/xmp/README create mode 100644 tests/phpunit/data/xmp/bag-for-seq.result.php create mode 100644 tests/phpunit/data/xmp/bag-for-seq.xmp create mode 100644 tests/phpunit/data/xmp/flash.result.php create mode 100644 tests/phpunit/data/xmp/flash.xmp create mode 100644 tests/phpunit/data/xmp/gps.result.php create mode 100644 tests/phpunit/data/xmp/gps.xmp create mode 100644 tests/phpunit/data/xmp/invalid-child-not-struct.result.php create mode 100644 tests/phpunit/data/xmp/invalid-child-not-struct.xmp create mode 100644 tests/phpunit/data/xmp/no-namespace.result.php create mode 100644 tests/phpunit/data/xmp/no-namespace.xmp create mode 100644 tests/phpunit/data/xmp/no-recognized-props.result.php create mode 100644 tests/phpunit/data/xmp/no-recognized-props.xmp create mode 100644 tests/phpunit/data/xmp/utf16BE.result.php create mode 100644 tests/phpunit/data/xmp/utf16BE.xmp create mode 100644 tests/phpunit/data/xmp/utf16LE.result.php create mode 100644 tests/phpunit/data/xmp/utf16LE.xmp create mode 100644 tests/phpunit/data/xmp/utf32BE.result.php create mode 100644 tests/phpunit/data/xmp/utf32BE.xmp create mode 100644 tests/phpunit/data/xmp/utf32LE.result.php create mode 100644 tests/phpunit/data/xmp/utf32LE.xmp create mode 100644 tests/phpunit/data/xmp/xmpExt.result.php create mode 100644 tests/phpunit/data/xmp/xmpExt.xmp create mode 100644 tests/phpunit/data/xmp/xmpExt2.xmp create mode 100644 tests/phpunit/data/zip/cd-gap.zip create mode 100644 tests/phpunit/data/zip/cd-truncated.zip create mode 100644 tests/phpunit/data/zip/class-trailing-null.zip create mode 100644 tests/phpunit/data/zip/class-trailing-slash.zip create mode 100644 tests/phpunit/data/zip/class.zip create mode 100644 tests/phpunit/data/zip/empty.zip create mode 100644 tests/phpunit/data/zip/looks-like-zip64.zip create mode 100644 tests/phpunit/data/zip/nosig.zip create mode 100644 tests/phpunit/data/zip/split.zip create mode 100644 tests/phpunit/data/zip/trail.zip create mode 100644 tests/phpunit/data/zip/wrong-cd-start-disk.zip create mode 100644 tests/phpunit/data/zip/wrong-central-entry-sig.zip create mode 100644 tests/phpunit/docs/ExportDemoTest.php create mode 100644 tests/phpunit/includes/ArticleTablesTest.php create mode 100644 tests/phpunit/includes/ArticleTest.php create mode 100644 tests/phpunit/includes/BlockTest.php create mode 100644 tests/phpunit/includes/CdbTest.php create mode 100644 tests/phpunit/includes/CollationTest.php create mode 100644 tests/phpunit/includes/DiffHistoryBlobTest.php create mode 100644 tests/phpunit/includes/EditPageTest.php create mode 100644 tests/phpunit/includes/ExternalStoreTest.php create mode 100644 tests/phpunit/includes/ExtraParserTest.php create mode 100644 tests/phpunit/includes/FauxResponseTest.php create mode 100644 tests/phpunit/includes/FormOptionsInitializationTest.php create mode 100644 tests/phpunit/includes/FormOptionsTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/GlobalTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/README create mode 100644 tests/phpunit/includes/GlobalFunctions/wfAssembleUrlTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfBaseNameTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfRemoveDotSegmentsTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfShorthandToIntegerTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfTimestampTest.php create mode 100644 tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php create mode 100644 tests/phpunit/includes/HooksTest.php create mode 100644 tests/phpunit/includes/HtmlTest.php create mode 100644 tests/phpunit/includes/HttpTest.php create mode 100644 tests/phpunit/includes/IPTest.php create mode 100644 tests/phpunit/includes/JsonTest.php create mode 100644 tests/phpunit/includes/LanguageConverterTest.php create mode 100644 tests/phpunit/includes/LicensesTest.php create mode 100644 tests/phpunit/includes/LinkerTest.php create mode 100644 tests/phpunit/includes/LinksUpdateTest.php create mode 100644 tests/phpunit/includes/LocalFileTest.php create mode 100644 tests/phpunit/includes/LocalisationCacheTest.php create mode 100644 tests/phpunit/includes/MWFunctionTest.php create mode 100644 tests/phpunit/includes/MWNamespaceTest.php create mode 100644 tests/phpunit/includes/MessageTest.php create mode 100644 tests/phpunit/includes/OutputPageTest.php create mode 100644 tests/phpunit/includes/PathRouterTest.php create mode 100644 tests/phpunit/includes/PreferencesTest.php create mode 100644 tests/phpunit/includes/Providers.php create mode 100644 tests/phpunit/includes/RecentChangeTest.php create mode 100644 tests/phpunit/includes/RequestContextTest.php create mode 100644 tests/phpunit/includes/ResourceLoaderTest.php create mode 100644 tests/phpunit/includes/RevisionStorageTest.php create mode 100644 tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php create mode 100644 tests/phpunit/includes/RevisionTest.php create mode 100644 tests/phpunit/includes/SampleTest.php create mode 100644 tests/phpunit/includes/SanitizerTest.php create mode 100644 tests/phpunit/includes/SanitizerValidateEmailTest.php create mode 100644 tests/phpunit/includes/SeleniumConfigurationTest.php create mode 100644 tests/phpunit/includes/SiteConfigurationTest.php create mode 100644 tests/phpunit/includes/StringUtilsTest.php create mode 100644 tests/phpunit/includes/TemplateCategoriesTest.php create mode 100644 tests/phpunit/includes/TestUser.php create mode 100644 tests/phpunit/includes/TimeAdjustTest.php create mode 100644 tests/phpunit/includes/TimestampTest.php create mode 100644 tests/phpunit/includes/TitleMethodsTest.php create mode 100644 tests/phpunit/includes/TitlePermissionTest.php create mode 100644 tests/phpunit/includes/TitleTest.php create mode 100644 tests/phpunit/includes/UIDGeneratorTest.php create mode 100644 tests/phpunit/includes/UserTest.php create mode 100644 tests/phpunit/includes/WebRequestTest.php create mode 100644 tests/phpunit/includes/WikiPageTest.php create mode 100644 tests/phpunit/includes/WikiPageTest_ContentHandlerUseDB.php create mode 100644 tests/phpunit/includes/XmlJsTest.php create mode 100644 tests/phpunit/includes/XmlSelectTest.php create mode 100644 tests/phpunit/includes/XmlTest.php create mode 100644 tests/phpunit/includes/ZipDirectoryReaderTest.php create mode 100644 tests/phpunit/includes/api/ApiAccountCreationTest.php create mode 100644 tests/phpunit/includes/api/ApiBlockTest.php create mode 100644 tests/phpunit/includes/api/ApiEditPageTest.php create mode 100644 tests/phpunit/includes/api/ApiOptionsTest.php create mode 100644 tests/phpunit/includes/api/ApiParseTest.php create mode 100644 tests/phpunit/includes/api/ApiPurgeTest.php create mode 100644 tests/phpunit/includes/api/ApiTest.php create mode 100644 tests/phpunit/includes/api/ApiTestCase.php create mode 100644 tests/phpunit/includes/api/ApiTestCaseUpload.php create mode 100644 tests/phpunit/includes/api/ApiUploadTest.php create mode 100644 tests/phpunit/includes/api/ApiWatchTest.php create mode 100644 tests/phpunit/includes/api/PrefixUniquenessTest.php create mode 100644 tests/phpunit/includes/api/RandomImageGenerator.php create mode 100644 tests/phpunit/includes/api/format/ApiFormatPhpTest.php create mode 100644 tests/phpunit/includes/api/format/ApiFormatTestBase.php create mode 100644 tests/phpunit/includes/api/generateRandomImages.php create mode 100644 tests/phpunit/includes/api/query/ApiQueryBasicTest.php create mode 100644 tests/phpunit/includes/api/query/ApiQueryContinue2Test.php create mode 100644 tests/phpunit/includes/api/query/ApiQueryContinueTest.php create mode 100644 tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php create mode 100644 tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php create mode 100644 tests/phpunit/includes/api/query/ApiQueryTest.php create mode 100644 tests/phpunit/includes/api/query/ApiQueryTestBase.php create mode 100644 tests/phpunit/includes/api/words.txt create mode 100644 tests/phpunit/includes/cache/GenderCacheTest.php create mode 100644 tests/phpunit/includes/cache/ProcessCacheLRUTest.php create mode 100644 tests/phpunit/includes/content/ContentHandlerTest.php create mode 100644 tests/phpunit/includes/content/CssContentTest.php create mode 100644 tests/phpunit/includes/content/JavaScriptContentTest.php create mode 100644 tests/phpunit/includes/content/TextContentTest.php create mode 100644 tests/phpunit/includes/content/WikitextContentHandlerTest.php create mode 100644 tests/phpunit/includes/content/WikitextContentTest.php create mode 100644 tests/phpunit/includes/db/DatabaseSQLTest.php create mode 100644 tests/phpunit/includes/db/DatabaseSqliteTest.php create mode 100644 tests/phpunit/includes/db/DatabaseTest.php create mode 100644 tests/phpunit/includes/db/ORMRowTest.php create mode 100644 tests/phpunit/includes/db/ORMTableTest.php create mode 100644 tests/phpunit/includes/db/TestORMRowTest.php create mode 100644 tests/phpunit/includes/debug/MWDebugTest.php create mode 100644 tests/phpunit/includes/filebackend/FileBackendTest.php create mode 100644 tests/phpunit/includes/filerepo/FileRepoTest.php create mode 100644 tests/phpunit/includes/filerepo/StoreBatchTest.php create mode 100644 tests/phpunit/includes/installer/InstallDocFormatterTest.php create mode 100644 tests/phpunit/includes/jobqueue/JobQueueTest.php create mode 100644 tests/phpunit/includes/json/ServicesJsonTest.php create mode 100644 tests/phpunit/includes/libs/CSSJanusTest.php create mode 100644 tests/phpunit/includes/libs/CSSMinTest.php create mode 100644 tests/phpunit/includes/libs/GenericArrayObjectTest.php create mode 100644 tests/phpunit/includes/libs/IEUrlExtensionTest.php create mode 100644 tests/phpunit/includes/libs/JavaScriptMinifierTest.php create mode 100644 tests/phpunit/includes/logging/LogFormatterTest.php create mode 100644 tests/phpunit/includes/logging/LogTests.i18n.php create mode 100644 tests/phpunit/includes/media/BitmapMetadataHandlerTest.php create mode 100644 tests/phpunit/includes/media/BitmapScalingTest.php create mode 100644 tests/phpunit/includes/media/ExifBitmapTest.php create mode 100644 tests/phpunit/includes/media/ExifRotationTest.php create mode 100644 tests/phpunit/includes/media/ExifTest.php create mode 100644 tests/phpunit/includes/media/FormatMetadataTest.php create mode 100644 tests/phpunit/includes/media/GIFMetadataExtractorTest.php create mode 100644 tests/phpunit/includes/media/GIFTest.php create mode 100644 tests/phpunit/includes/media/IPTCTest.php create mode 100644 tests/phpunit/includes/media/JpegMetadataExtractorTest.php create mode 100644 tests/phpunit/includes/media/JpegTest.php create mode 100644 tests/phpunit/includes/media/MediaHandlerTest.php create mode 100644 tests/phpunit/includes/media/PNGMetadataExtractorTest.php create mode 100644 tests/phpunit/includes/media/PNGTest.php create mode 100644 tests/phpunit/includes/media/SVGMetadataExtractorTest.php create mode 100644 tests/phpunit/includes/media/TiffTest.php create mode 100644 tests/phpunit/includes/media/XMPTest.php create mode 100644 tests/phpunit/includes/media/XMPValidateTest.php create mode 100644 tests/phpunit/includes/normal/CleanUpTest.php create mode 100644 tests/phpunit/includes/objectcache/BagOStuffTest.php create mode 100644 tests/phpunit/includes/parser/MagicVariableTest.php create mode 100644 tests/phpunit/includes/parser/MediaWikiParserTest.php create mode 100644 tests/phpunit/includes/parser/NewParserTest.php create mode 100644 tests/phpunit/includes/parser/ParserMethodsTest.php create mode 100644 tests/phpunit/includes/parser/ParserOutputTest.php create mode 100644 tests/phpunit/includes/parser/ParserPreloadTest.php create mode 100644 tests/phpunit/includes/parser/PreprocessorTest.php create mode 100644 tests/phpunit/includes/parser/TagHooksTest.php create mode 100644 tests/phpunit/includes/search/SearchEngineTest.php create mode 100644 tests/phpunit/includes/search/SearchUpdateTest.php create mode 100644 tests/phpunit/includes/site/MediaWikiSiteTest.php create mode 100644 tests/phpunit/includes/site/SiteListTest.php create mode 100644 tests/phpunit/includes/site/SiteSQLStoreTest.php create mode 100644 tests/phpunit/includes/site/SiteTest.php create mode 100644 tests/phpunit/includes/site/TestSites.php create mode 100644 tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php create mode 100644 tests/phpunit/includes/specials/SpecialRecentchangesTest.php create mode 100644 tests/phpunit/includes/specials/SpecialSearchTest.php create mode 100644 tests/phpunit/includes/upload/UploadFromUrlTest.php create mode 100644 tests/phpunit/includes/upload/UploadStashTest.php create mode 100644 tests/phpunit/includes/upload/UploadTest.php create mode 100644 tests/phpunit/install-phpunit.sh create mode 100644 tests/phpunit/languages/LanguageAmTest.php create mode 100644 tests/phpunit/languages/LanguageArTest.php create mode 100644 tests/phpunit/languages/LanguageBeTest.php create mode 100644 tests/phpunit/languages/LanguageBe_taraskTest.php create mode 100644 tests/phpunit/languages/LanguageBhoTest.php create mode 100644 tests/phpunit/languages/LanguageBsTest.php create mode 100644 tests/phpunit/languages/LanguageClassesTestCase.php create mode 100644 tests/phpunit/languages/LanguageCsTest.php create mode 100644 tests/phpunit/languages/LanguageCuTest.php create mode 100644 tests/phpunit/languages/LanguageCyTest.php create mode 100644 tests/phpunit/languages/LanguageDsbTest.php create mode 100644 tests/phpunit/languages/LanguageFrTest.php create mode 100644 tests/phpunit/languages/LanguageGaTest.php create mode 100644 tests/phpunit/languages/LanguageGdTest.php create mode 100644 tests/phpunit/languages/LanguageGvTest.php create mode 100644 tests/phpunit/languages/LanguageHeTest.php create mode 100644 tests/phpunit/languages/LanguageHiTest.php create mode 100644 tests/phpunit/languages/LanguageHrTest.php create mode 100644 tests/phpunit/languages/LanguageHsbTest.php create mode 100644 tests/phpunit/languages/LanguageHuTest.php create mode 100644 tests/phpunit/languages/LanguageHyTest.php create mode 100644 tests/phpunit/languages/LanguageKshTest.php create mode 100644 tests/phpunit/languages/LanguageLnTest.php create mode 100644 tests/phpunit/languages/LanguageLtTest.php create mode 100644 tests/phpunit/languages/LanguageLvTest.php create mode 100644 tests/phpunit/languages/LanguageMgTest.php create mode 100644 tests/phpunit/languages/LanguageMkTest.php create mode 100644 tests/phpunit/languages/LanguageMlTest.php create mode 100644 tests/phpunit/languages/LanguageMoTest.php create mode 100644 tests/phpunit/languages/LanguageMtTest.php create mode 100644 tests/phpunit/languages/LanguageNlTest.php create mode 100644 tests/phpunit/languages/LanguageNsoTest.php create mode 100644 tests/phpunit/languages/LanguagePlTest.php create mode 100644 tests/phpunit/languages/LanguageRoTest.php create mode 100644 tests/phpunit/languages/LanguageRuTest.php create mode 100644 tests/phpunit/languages/LanguageSeTest.php create mode 100644 tests/phpunit/languages/LanguageSgsTest.php create mode 100644 tests/phpunit/languages/LanguageShTest.php create mode 100644 tests/phpunit/languages/LanguageSkTest.php create mode 100644 tests/phpunit/languages/LanguageSlTest.php create mode 100644 tests/phpunit/languages/LanguageSmaTest.php create mode 100644 tests/phpunit/languages/LanguageSrTest.php create mode 100644 tests/phpunit/languages/LanguageTest.php create mode 100644 tests/phpunit/languages/LanguageTiTest.php create mode 100644 tests/phpunit/languages/LanguageTlTest.php create mode 100644 tests/phpunit/languages/LanguageTrTest.php create mode 100644 tests/phpunit/languages/LanguageUkTest.php create mode 100644 tests/phpunit/languages/LanguageUzTest.php create mode 100644 tests/phpunit/languages/LanguageWaTest.php create mode 100644 tests/phpunit/languages/utils/CLDRPluralRuleEvaluatorTest.php create mode 100644 tests/phpunit/maintenance/DumpTestCase.php create mode 100644 tests/phpunit/maintenance/MaintenanceTest.php create mode 100644 tests/phpunit/maintenance/backupPrefetchTest.php create mode 100644 tests/phpunit/maintenance/backupTextPassTest.php create mode 100644 tests/phpunit/maintenance/backup_LogTest.php create mode 100644 tests/phpunit/maintenance/backup_PageTest.php create mode 100644 tests/phpunit/maintenance/fetchTextTest.php create mode 100644 tests/phpunit/maintenance/getSlaveServerTest.php create mode 100644 tests/phpunit/phpunit.php create mode 100644 tests/phpunit/resources/ResourcesTest.php create mode 100644 tests/phpunit/run-tests.bat create mode 100644 tests/phpunit/skins/SideBarTest.php create mode 100644 tests/phpunit/suite.xml create mode 100644 tests/phpunit/suites/ExtensionsTestSuite.php create mode 100644 tests/phpunit/suites/UploadFromUrlTestSuite.php create mode 100644 tests/qunit/.htaccess create mode 100644 tests/qunit/QUnitTestResources.php create mode 100644 tests/qunit/data/callMwLoaderTestCallback.js create mode 100644 tests/qunit/data/generateJqueryMsgData.php create mode 100644 tests/qunit/data/load.mock.php create mode 100644 tests/qunit/data/mediawiki.jqueryMsg.data.js create mode 100644 tests/qunit/data/qunitOkCall.js create mode 100644 tests/qunit/data/styleTest.css.php create mode 100644 tests/qunit/data/testrunner.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.autoEllipsis.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.byteLength.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.client.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.colorUtil.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.delayedBind.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.hidpi.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.highlightText.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.localize.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js create mode 100644 tests/qunit/suites/resources/jquery/jquery.textSelection.test.js create mode 100644 tests/qunit/suites/resources/mediawiki.api/mediawiki.api.parse.test.js create mode 100644 tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js create mode 100644 tests/qunit/suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.cldr.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.language.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js create mode 100644 tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js create mode 100644 tests/selenium/Selenium.php create mode 100644 tests/selenium/SeleniumConfig.php create mode 100644 tests/selenium/SeleniumLoader.php create mode 100644 tests/selenium/SeleniumServerManager.php create mode 100644 tests/selenium/SeleniumTestCase.php create mode 100644 tests/selenium/SeleniumTestConsoleLogger.php create mode 100644 tests/selenium/SeleniumTestConstants.php create mode 100644 tests/selenium/SeleniumTestHTMLLogger.php create mode 100644 tests/selenium/SeleniumTestListener.php create mode 100644 tests/selenium/SeleniumTestSuite.php create mode 100644 tests/selenium/data/SimpleSeleniumTestDB.sql create mode 100644 tests/selenium/data/SimpleSeleniumTestImages.zip create mode 100644 tests/selenium/data/Wikipedia-logo-v2-de.png create mode 100644 tests/selenium/data/mediawiki118_fresh_installation.sql create mode 100644 tests/selenium/installer/MediaWikiButtonsAvailabilityTestCase.php create mode 100644 tests/selenium/installer/MediaWikiDifferentDatabaseAccountTestCase.php create mode 100644 tests/selenium/installer/MediaWikiDifferntDatabasePrefixTestCase.php create mode 100644 tests/selenium/installer/MediaWikiErrorsConnectToDatabasePageTestCase.php create mode 100644 tests/selenium/installer/MediaWikiErrorsNamepageTestCase.php create mode 100644 tests/selenium/installer/MediaWikiHelpFieldHintTestCase.php create mode 100644 tests/selenium/installer/MediaWikiInstallationCommonFunction.php create mode 100644 tests/selenium/installer/MediaWikiInstallationConfig.php create mode 100644 tests/selenium/installer/MediaWikiInstallationMessage.php create mode 100644 tests/selenium/installer/MediaWikiInstallationVariables.php create mode 100644 tests/selenium/installer/MediaWikiInstallerTestSuite.php create mode 100644 tests/selenium/installer/MediaWikiMySQLDataBaseTestCase.php create mode 100644 tests/selenium/installer/MediaWikiMySQLiteDataBaseTestCase.php create mode 100644 tests/selenium/installer/MediaWikiOnAlreadyInstalledTestCase.php create mode 100644 tests/selenium/installer/MediaWikiRestartInstallationTestCase.php create mode 100644 tests/selenium/installer/MediaWikiRightFrameworkLinksTestCase.php create mode 100644 tests/selenium/installer/MediaWikiUpgradeExistingDatabaseTestCase.php create mode 100644 tests/selenium/installer/MediaWikiUserInterfaceTestCase.php create mode 100644 tests/selenium/installer/README.txt create mode 100644 tests/selenium/selenium_settings.ini.sample create mode 100644 tests/selenium/selenium_settings_grid.ini.sample create mode 100644 tests/selenium/suites/AddContentToNewPageTestCase.php create mode 100644 tests/selenium/suites/AddNewPageTestCase.php create mode 100644 tests/selenium/suites/CreateAccountTestCase.php create mode 100644 tests/selenium/suites/DeletePageAdminTestCase.php create mode 100644 tests/selenium/suites/EmailPasswordTestCase.php create mode 100644 tests/selenium/suites/MediaWikiEditorConfig.php create mode 100644 tests/selenium/suites/MediaWikiEditorTestSuite.php create mode 100644 tests/selenium/suites/MediaWikiExtraTestSuite.php create mode 100644 tests/selenium/suites/MediawikiCoreSmokeTestCase.php create mode 100644 tests/selenium/suites/MediawikiCoreSmokeTestSuite.php create mode 100644 tests/selenium/suites/MovePageTestCase.php create mode 100644 tests/selenium/suites/MyContributionsTestCase.php create mode 100644 tests/selenium/suites/MyWatchListTestCase.php create mode 100644 tests/selenium/suites/PageDeleteTestSuite.php create mode 100644 tests/selenium/suites/PageSearchTestCase.php create mode 100644 tests/selenium/suites/PreviewPageTestCase.php create mode 100644 tests/selenium/suites/SavePageTestCase.php create mode 100644 tests/selenium/suites/SimpleSeleniumConfig.php create mode 100644 tests/selenium/suites/SimpleSeleniumTestCase.php create mode 100644 tests/selenium/suites/SimpleSeleniumTestSuite.php create mode 100644 tests/selenium/suites/UserPreferencesTestCase.php create mode 100644 tests/testHelpers.inc (limited to 'tests/phpunit/includes/api/format/ApiFormatTestBase.php') diff --git a/.gitreview b/.gitreview new file mode 100644 index 00000000..65dbc270 --- /dev/null +++ b/.gitreview @@ -0,0 +1,6 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/core.git +defaultbranch=REL1_21 +defaultrebase=0 diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 00000000..3869deb9 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,27 @@ +# third-party libs +extensions/ +node_modules/ +resources/jquery/jquery.appear.js +resources/jquery/jquery.async.js +resources/jquery/jquery.cycle.all.js +resources/jquery/jquery.cookie.js +resources/jquery/jquery.farbtastic.js +resources/jquery/jquery.form.js +resources/jquery/jquery.hoverIntent.js +resources/jquery/jquery.js +resources/jquery/jquery.json.js +resources/jquery/jquery.jStorage.js +resources/jquery/jquery.mockjax.js +resources/jquery/jquery.qunit.js +resources/jquery/jquery.validate.js +resources/jquery/jquery.xmldom.js +resources/jquery.effects/ +resources/jquery.tipsy/ +resources/jquery.ui/ +resources/mediawiki.libs/ + +# legacy scripts +skins/common/ + +# github.com/jshint/jshint/issues/729 +tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000..7fa138d4 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,34 @@ +{ + "predef": [ + "mediaWiki", + "jQuery", + "QUnit" + ], + + "bitwise": true, + "camelcase": true, + "curly": true, + "eqeqeq": true, + "forin": false, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "noempty": true, + "nonew": true, + "quotmark": "single", + "regexp": false, + "undef": true, + "unused": true, + "strict": false, + "trailing": true, + + "laxbreak": true, + "smarttabs": true, + "multistr": true, + + "browser": true, + + "nomen": true, + "onevar": true +} diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index ef4f08c6..4e08480f 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -3,11 +3,25 @@ Security reminder: MediaWiki does not require PHP's register_globals. If you have it on, turn it '''off''' if you can. +== MediaWiki 1.21.2 == + +This is a security adn maintenance release of the MediaWiki 1.21 branch. + +=== Changes since 1.21.1 === + +* SECURITY: Fix extension detection with 2 .'s +* SECURITY: Support for the 'gettoken' parameter to action=block and action=unblock, + deprecated since 1.20, has been removed. +* SECURITY: Sanitize ResourceLoader exception messages +* Purge upstream caches when deleting file assets. +* Unit test suite now runs the AutoLoader tests. Also fixed the autoloading + entry for the PageORMTableForTesting class though it had no impact. + == MediaWiki 1.21.1 == This is a maintenance release of the 1.21 branch. -MediaWiki 1.21 is an stable branch and is recommended for use in production. +MediaWiki 1.21 is a stable branch, and is recommended for use in production. === Changes since 1.21.0 === diff --git a/extensions/Cite/.gitreview b/extensions/Cite/.gitreview new file mode 100644 index 00000000..6ae9db41 --- /dev/null +++ b/extensions/Cite/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/Cite.git +defaultbranch=master diff --git a/extensions/ConfirmEdit/.gitreview b/extensions/ConfirmEdit/.gitreview new file mode 100644 index 00000000..780d35df --- /dev/null +++ b/extensions/ConfirmEdit/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/ConfirmEdit.git +defaultbranch=master diff --git a/extensions/ConfirmEdit/ReCaptcha.i18n.php b/extensions/ConfirmEdit/ReCaptcha.i18n.php index a7fffb59..e8722f93 100644 --- a/extensions/ConfirmEdit/ReCaptcha.i18n.php +++ b/extensions/ConfirmEdit/ReCaptcha.i18n.php @@ -400,13 +400,12 @@ $messages['nl-informal'] = array( ); /** Polish (polski) - * @author WTM */ $messages['pl'] = array( 'recaptcha-edit' => 'Aby uchronić nas przed robotami, proszę wpisać dwa widoczne słowa w poniższym polu:', 'recaptcha-addurl' => 'Twoja edycja zawiera linki zewnętrzne. Aby uchronić nas przed robotami, proszę wpisać dwa widoczne słowa w poniższym polu:', 'recaptcha-badpass' => 'Aby uchronić nas przed złamaniem automatycznym haseł, proszę wpisać dwa widoczne słowa w poniższym polu:', - 'recaptcha-createaccount' => 'Aby uchronić nas przed automatycznym tworzeniem użytkowników, proszę wpisać dwa widoczne słowa w poniższym polu:', + 'recaptcha-createaccount' => 'Aby uchronić nas przed automatycznym stworzeniem użytkowników, proszę wpisać dwa widoczne słowa w poniższym polu:', 'recaptcha-createaccount-fail' => 'Odpowiedź na reCAPTCHA jest fałszywa lub brakująca.', 'recaptcha-create' => 'Aby uchronić nas przed tworzeniem stron przez robotów, proszę wpisać dwa widoczne słowa w poniższym polu:', ); diff --git a/extensions/Gadgets/.gitreview b/extensions/Gadgets/.gitreview new file mode 100644 index 00000000..a1a8ead4 --- /dev/null +++ b/extensions/Gadgets/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/Gadgets.git +defaultbranch=master diff --git a/extensions/Gadgets/tests/GadgetTest.php b/extensions/Gadgets/tests/GadgetTest.php new file mode 100644 index 00000000..c9332a6c --- /dev/null +++ b/extensions/Gadgets/tests/GadgetTest.php @@ -0,0 +1,81 @@ +assertEquals( 'Gadget', get_class( $g ) ); + + return $g; + } + + function testInvalidLines() { + $this->assertFalse( Gadget::newFromDefinition( '' ) ); + $this->assertFalse( Gadget::newFromDefinition( '' ) ); + } + + function testSimpleCases() { + $g = $this->create( '* foo bar| foo.css|foo.js|foo.bar' ); + $this->assertEquals( 'foo_bar', $g->getName() ); + $this->assertEquals( 'ext.gadget.foo_bar', $g->getModuleName() ); + $this->assertEquals( array( 'Gadget-foo.js' ), $g->getScripts() ); + $this->assertEquals( array( 'Gadget-foo.css' ), $g->getStyles() ); + $this->assertEquals( array( 'Gadget-foo.js', 'Gadget-foo.css' ), + $g->getScriptsAndStyles() ); + $this->assertEquals( array( 'Gadget-foo.js' ), $g->getLegacyScripts() ); + $this->assertFalse( $g->supportsResourceLoader() ); + $this->assertTrue( $g->hasModule() ); + } + + function testRLtag() { + $g = $this->create( '*foo [ResourceLoader]|foo.js|foo.css' ); + $this->assertEquals( 'foo', $g->getName() ); + $this->assertTrue( $g->supportsResourceLoader() ); + $this->assertEquals( 0, count( $g->getLegacyScripts() ) ); + } + + function testDependencies() { + $g = $this->create( '* foo[ResourceLoader|dependencies=jquery.ui]|bar.js' ); + $this->assertEquals( array( 'Gadget-bar.js' ), $g->getScripts() ); + $this->assertTrue( $g->supportsResourceLoader() ); + $this->assertEquals( array( 'jquery.ui' ), $g->getDependencies() ); + } + + function testPreferences() { + global $wgUser, $wgOut, $wgTitle; + + // This test makes call to the parser which requires valids Outputpage + // and Title objects. Set them up there, they will be released at the + // end of the test. + $old_wgOut = $wgOut; + $old_wgTitle = $wgTitle; + $wgTitle = Title::newFromText( 'Parser test for Gadgets extension' ); + + // Proceed with test setup: + $prefs = array(); + $context = new RequestContext(); + $wgOut = $context->getOutput(); + $wgOut->setTitle( Title::newFromText( 'test' ) ); + + Gadget::loadStructuredList( '* foo | foo.js +==keep-section1== +* bar| bar.js +==remove-section== +* baz [rights=embezzle] |baz.js +==keep-section2== +* quux [rights=read] | quux.js' ); + $this->assertTrue( GadgetHooks::getPreferences( $wgUser, $prefs ), 'GetPrefences hook should return true' ); + + $options = $prefs['gadgets']['options']; + $this->assertFalse( isset( $options['<gadget-section-remove-section>'] ), 'Must not show empty sections' ); + $this->assertTrue( isset( $options['<gadget-section-keep-section1>'] ) ); + $this->assertTrue( isset( $options['<gadget-section-keep-section2>'] ) ); + + // Restore globals + $wgOut = $old_wgOut; + $wgTitle = $old_wgTitle; + } +} diff --git a/extensions/ImageMap/.gitreview b/extensions/ImageMap/.gitreview new file mode 100644 index 00000000..2629c9d9 --- /dev/null +++ b/extensions/ImageMap/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/ImageMap.git +defaultbranch=master diff --git a/extensions/InputBox/.gitreview b/extensions/InputBox/.gitreview new file mode 100644 index 00000000..9d0c704d --- /dev/null +++ b/extensions/InputBox/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/InputBox.git +defaultbranch=master diff --git a/extensions/Interwiki/.gitreview b/extensions/Interwiki/.gitreview new file mode 100644 index 00000000..fcc03f61 --- /dev/null +++ b/extensions/Interwiki/.gitreview @@ -0,0 +1,6 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/Interwiki.git +defaultbranch=master +defaultrebase=0 \ No newline at end of file diff --git a/extensions/LocalisationUpdate/.gitreview b/extensions/LocalisationUpdate/.gitreview new file mode 100644 index 00000000..da37d04d --- /dev/null +++ b/extensions/LocalisationUpdate/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/LocalisationUpdate.git +defaultbranch=master diff --git a/extensions/LocalisationUpdate/tests/tokenTest.php b/extensions/LocalisationUpdate/tests/tokenTest.php new file mode 100644 index 00000000..1112313c --- /dev/null +++ b/extensions/LocalisationUpdate/tests/tokenTest.php @@ -0,0 +1,91 @@ +getVars(); + $retval = @$vars[$varname]; + } catch( Exception $e ) { + print $e . "\n"; + $retval = null; + } + return $retval; +} + +function quickTokenExtractArray( $php, $varname ) { + $reader = new QuickArrayReader("getVar( $varname ); +} + + +if( count( $args ) ) { + $sources = $args; +} else { + $sources = + array_merge( + glob("$IP/extensions/*/*.i18n.php"), + glob("$IP/languages/messages/Messages*.php") ); +} + +foreach( $sources as $sourceFile ) { + $rel = basename( $sourceFile ); + $out = str_replace( '/', '-', $rel ); + + $sourceData = file_get_contents( $sourceFile ); + + if( preg_match( '!extensions/!', $sourceFile ) ) { + $sourceData = LocalisationUpdate::cleanupExtensionFile( $sourceData ); + $items = 'langs'; + } else { + $sourceData = LocalisationUpdate::cleanupFile( $sourceData ); + $items = 'messages'; + } + + file_put_contents( "$out.txt", $sourceData ); + + $start = microtime(true); + $eval = evalExtractArray( $sourceData, 'messages' ); + $deltaEval = microtime(true) - $start; + + $start = microtime(true); + $quick = quickTokenExtractArray( $sourceData, 'messages' ); + $deltaQuick = microtime(true) - $start; + + $start = microtime(true); + $token = confExtractArray( $sourceData, 'messages' ); + $deltaToken = microtime(true) - $start; + + $hashEval = md5(serialize($eval)); + $hashToken = md5(serialize($token)); + $hashQuick = md5(serialize($quick)); + $countEval = count( (array)$eval); + $countToken = count( (array)$token ); + $countQuick = count( (array)$quick ); + + printf( "%s %s %d $items - %0.1fms - eval\n", $rel, $hashEval, $countEval, $deltaEval * 1000 ); + printf( "%s %s %d $items - %0.1fms - QuickArrayReader\n", $rel, $hashQuick, $countQuick, $deltaQuick * 1000 ); + printf( "%s %s %d $items - %0.1fms - ConfEditor\n", $rel, $hashToken, $countToken, $deltaToken * 1000 ); + + if( $hashEval !== $hashToken || $hashEval !== $hashQuick ) { + echo "FAILED on $rel\n"; + file_put_contents( "$out-eval.txt", var_export( $eval, true ) ); + file_put_contents( "$out-token.txt", var_export( $token, true ) ); + file_put_contents( "$out-quick.txt", var_export( $quick, true ) ); + #die("check eval.txt and token.txt\n"); + } + echo "\n"; +} + +echo "ok\n"; + diff --git a/extensions/Nuke/.gitreview b/extensions/Nuke/.gitreview new file mode 100644 index 00000000..c623aede --- /dev/null +++ b/extensions/Nuke/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/Nuke.git +defaultbranch=master diff --git a/extensions/ParserFunctions/.gitreview b/extensions/ParserFunctions/.gitreview new file mode 100644 index 00000000..decb9867 --- /dev/null +++ b/extensions/ParserFunctions/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/ParserFunctions.git +defaultbranch=master diff --git a/extensions/ParserFunctions/ParserFunctions.i18n.magic.php b/extensions/ParserFunctions/ParserFunctions.i18n.magic.php index 1a37cf9e..4fdb83eb 100644 --- a/extensions/ParserFunctions/ParserFunctions.i18n.magic.php +++ b/extensions/ParserFunctions/ParserFunctions.i18n.magic.php @@ -96,8 +96,8 @@ $magicWords['br'] = array( /** Chechen (нохчийн) */ $magicWords['ce'] = array( - 'time' => array( 0, 'хан' ), - 'replace' => array( 0, 'хийцарна', 'замена' ), + 'time' => array( 0, 'хан', 'time' ), + 'replace' => array( 0, 'хийцарна', 'замена', 'replace' ), ); /** Czech (česky) */ diff --git a/extensions/ParserFunctions/tests/ExpressionTest.php b/extensions/ParserFunctions/tests/ExpressionTest.php new file mode 100644 index 00000000..169a9cb4 --- /dev/null +++ b/extensions/ParserFunctions/tests/ExpressionTest.php @@ -0,0 +1,76 @@ +parser = new ExprParser(); + } + + /** + * @dataProvider provideExpressions + */ + function testExpression( $input, $expected ) { + $this->assertEquals( + $expected, + $this->parser->doExpression( $input ) + ); + } + + function provideExpressions() { + return array( + array( '1 or 0', '1' ), + array( 'not (1 and 0)', '1' ), + array( 'not 0', '1' ), + array( '4 < 5', '1' ), + array( '-5 < 2', '1' ), + array( '-2 <= -2', '1' ), + array( '4 > 3', '1' ), + array( '4 > -3', '1' ), + array( '5 >= 2', '1' ), + array( '2 >= 2', '1' ), + array( '1 != 2', '1' ), + array( '-4 * -4 = 4 * 4', '1' ), + array( 'not (1 != 1)', '1' ), + array( '1 + 1', '2' ), + array( '-1 + 1', '0' ), + array( '+1 + 1', '2' ), + array( '4 * 4', '16' ), + array( '(1/3) * 3', '1' ), + array( '3 / 1.5', '2' ), + array( '3 / 0.2', '15' ), + array( '3 / ( 2.0 * 0.1 )', '15' ), + array( '3 / ( 2.0 / 10 )', '15' ), + array( '3 / (- 0.2 )', '-15' ), + array( '3 / abs( 0.2 )', '15' ), + array( '3 mod 2', '1' ), + array( '1e4', '10000' ), + array( '1e-2', '0.01' ), + array( '4.0 round 0', '4' ), + array( 'ceil 4', '4' ), + array( 'floor 4', '4' ), + array( '4.5 round 0', '5' ), + array( '4.2 round 0', '4' ), + array( '-4.2 round 0', '-4' ), + array( '-4.5 round 0', '-5' ), + array( '-2.0 round 0', '-2' ), + array( 'ceil -3', '-3' ), + array( 'floor -6.0', '-6' ), + array( 'ceil 4.2', '5' ), + array( 'ceil -4.5', '-4' ), + array( 'floor -4.5', '-5' ), + array( 'abs(-2)', '2' ), + array( 'ln(exp(1))', '1' ), + array( 'trunc(4.5)', '4' ), + array( 'trunc(-4.5)', '-4' ), + array( '123 fmod (2^64-1)', '123' ), + array( '5.7 mod 1.3', '0' ), + array( '5.7 fmod 1.3', '0.5' ), + ); + } +} + diff --git a/extensions/PdfHandler/.gitreview b/extensions/PdfHandler/.gitreview new file mode 100644 index 00000000..f5eca40e --- /dev/null +++ b/extensions/PdfHandler/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/PdfHandler.git +defaultbranch=master diff --git a/extensions/PdfHandler/PdfHandler_body.php b/extensions/PdfHandler/PdfHandler_body.php index 8fa6719b..73ce1b58 100644 --- a/extensions/PdfHandler/PdfHandler_body.php +++ b/extensions/PdfHandler/PdfHandler_body.php @@ -315,7 +315,7 @@ class PdfHandler extends ImageHandler { */ function pageCount( $image ) { $data = $this->getMetaArray( $image ); - if ( !$data || !isset( $data['Pages'] ) ) { + if ( !$data ) { return false; } return intval( $data['Pages'] ); diff --git a/extensions/Poem/.gitreview b/extensions/Poem/.gitreview new file mode 100644 index 00000000..aac78b2b --- /dev/null +++ b/extensions/Poem/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/Poem.git +defaultbranch=master diff --git a/extensions/Renameuser/.gitreview b/extensions/Renameuser/.gitreview new file mode 100644 index 00000000..0d757141 --- /dev/null +++ b/extensions/Renameuser/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/Renameuser.git +defaultbranch=master diff --git a/extensions/SpamBlacklist/.gitreview b/extensions/SpamBlacklist/.gitreview new file mode 100644 index 00000000..d74ae8f9 --- /dev/null +++ b/extensions/SpamBlacklist/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/SpamBlacklist.git +defaultbranch=master diff --git a/extensions/SyntaxHighlight_GeSHi/.gitreview b/extensions/SyntaxHighlight_GeSHi/.gitreview new file mode 100644 index 00000000..cb9e4b44 --- /dev/null +++ b/extensions/SyntaxHighlight_GeSHi/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/SyntaxHighlight_GeSHi.git +defaultbranch=master diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/contrib/aliased.php b/extensions/SyntaxHighlight_GeSHi/geshi/contrib/aliased.php deleted file mode 100644 index cee31289..00000000 --- a/extensions/SyntaxHighlight_GeSHi/geshi/contrib/aliased.php +++ /dev/null @@ -1,123 +0,0 @@ - - * @version $Id: aliased.php 2533 2012-08-15 18:49:04Z benbe $ - */ - -// Your config here -define("SOURCE_ROOT", "/var/www/your/source/root/"); - -// Assume you've put geshi in the include_path already -require_once("geshi.php"); - -// Get path info -$path = SOURCE_ROOT.$_SERVER['PATH_INFO']; - -// Check for dickheads trying to use '../' to get to sensitive areas -$base_path_len = strlen(SOURCE_ROOT); -$real_path = realpath($path); -if(strncmp($real_path, SOURCE_ROOT, $base_path_len)) { - exit("Access outside acceptable path."); -} - -// Check file exists -if(!file_exists($path)) { - exit("File not found ($path)."); -} - -// Prepare GeSHi instance -$geshi = new GeSHi(); -$geshi->set_language('text'); -$geshi->load_from_file($path); -$geshi->set_header_type(GESHI_HEADER_PRE); -$geshi->enable_classes(); -$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 10); -$geshi->set_overall_style('color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0;', true); -$geshi->set_line_style('font: normal normal 95% \'Courier New\', Courier, monospace; color: #003030;', 'font-weight: bold; color: #006060;', true); -$geshi->set_code_style('color: #000020;', 'color: #000020;'); -$geshi->set_link_styles(GESHI_LINK, 'color: #000060;'); -$geshi->set_link_styles(GESHI_HOVER, 'background-color: #f0f000;'); -$geshi->set_header_content('Source code viewer - ' . $path . ' - ' . $geshi->get_language_name()); -$geshi->set_header_content_style('font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;'); -$geshi->set_footer_content('Parsed in