aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser/parserTest.inc
Commit message (Collapse)AuthorAgeFilesLines
* Fixed attempt to write to the wiki's upload directory during parser tests ↵Tim Starling2012-03-201-1/+13
| | | | | | | instead of /tmp, this is not allowed. I'm not sure what setupGlobals() is meant to do nowadays, that part is untested. It seems to be duplicated in ParserTest::__construct(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/114224
* Improve documentationSam Reed2012-02-021-1/+0
| | | | | | | | | Simplify if Fix whitespace Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110609
* Revert r108358. It's a good fellow and we like to keep it.Platonides2012-01-091-0/+1317
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108475
* * Drop old parserTests.php way of running parser tests. You can run parser ↵Chad Horohoe2012-01-081-1317/+0
| | | | | | | | | | | | | tests via --group Parser or specifying the includes/parser/MediaWikiParserTest.php test case * Drop now unused various test recorder options -- phpunit outputs its data in lots of machine-readable formats, use those if you need to work with test data * There's still a lot of duplication between NewParserTest::setUp() and MediaWikiTestCase, but hey one step at a time ;-) * All tests pass for me (make phpunit && make parser) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108358
* * Don't select (even twice for PHPUnit tests) "FOR UPDATE", but use the ↵Alexandre Emsenhuber2012-01-071-8/+13
| | | | | | | | | | | master database directly instead * Also pass the line number * Removed useless usage of $title when throwing the exception about invalid since that variable is always null * Added $ignoreDuplicate parameter to ParserTest::addArticle() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108316
* r108300: updated parserTest.inc tests and re-enabled testBug29408()Aaron Schulz2012-01-071-8/+8
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108310
* parserTest need to clone user_former_groups tableAntoine Musso2012-01-051-1/+1
| | | | | | | | Not sure why it is suddenly needed. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108136
* Fix for r106752: manually add the backend to the fake local repo to avoid ↵Alexandre Emsenhuber2011-12-311-1/+10
| | | | | | | | | exception when running parser tests. See https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106752#c28264 for the report. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/107724
* * FU r106752: de-uglified Setup.php by moving most of the b/c code into ↵Aaron Schulz2011-12-221-13/+10
| | | | | | | | | | | | FileBackendGroup. Deferred registration of file backends and lock managers to the respective singleton() functions for the group objects. * Refactored FileRepo::initZones() to require the specific zones; nothing was using it differently. * Removed deleted zone check in deleteBatch(), a similar error will instead trigger with the initZones() call as needed. * Added $wgLocalFileRepo comment. * Updated tests. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/107028
* FU r106752: use "media-" instead of "images-" in container names. Long live ↵Aaron Schulz2011-12-201-5/+5
| | | | | | | books, video, 3D meshes, and animated holograms from the future! Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106894
* Set deleted zone container in parserTest.incAaron Schulz2011-12-201-1/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106771
* Merged FileBackend branch. Manually avoiding merging the many prop-only ↵Aaron Schulz2011-12-201-6/+15
| | | | | | | changes SVN likes to sprinkle in (easy to spot from the change list). Did not add SwiftFileBackend.php as it still is in development. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106752
* Use WikiPage instead of ArticleAlexandre Emsenhuber2011-12-111-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/105786
* Bug 29524 - Rename RequestContext::getLang to getLanguageJohn Du Hart2011-11-211-2/+2
| | | | | | | I'll be amazed if this doens't break any tests. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103817
* parserTests: add --filter as an alias of --regexAntoine Musso2011-11-191-0/+3
| | | | | | | | | PHPUnit use the --filter option and I keep incorrectly using it for parserTest. So this is adding an alias of --regex. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103699
* Comments, braces, explicit member variablesSam Reed2011-11-161-1/+0
| | | | | | | Remove a couple of unused variables Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103323
* Made setupGlobals() return the created context and use it instead of either ↵Alexandre Emsenhuber2011-11-101-7/+8
| | | | | | | global variables or recreating more instance of those classes Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/102648
* parsertest now destroy virtual table under SQLiteAntoine Musso2011-10-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | Fix: Bug 29912 - Unit tests break if parsertest tables are still present The parserTest suite duplicate available tables. When using temporary table it assumed every table are temporary. Under SQLite searchindex is a virtual table and thus remained after a run of parserTests.php As a side effect, when running the PHPUnit with that remaining table, it caused a nice error: The last attempted database query was: "DELETE FROM unittest_parsertest_searchindex" from within function "MediaWikiTestCase::resetDB". Database returned error "1: SQL logic error or missing database" This patch is not needed for REL1_18 continuous integration since we never run the parserTests.php script. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/101002
* Quick and ugly fix to stop installs with CACHE_DB from immediately failing ↵Aaron Schulz2011-10-271-2/+13
| | | | | | | with DB errors. Something is wonked with the order of temp table creation. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100933
* Minor code style cleanupsAaron Schulz2011-10-271-4/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100931
* Add, update, tweak documentationSam Reed2011-10-261-1/+1
| | | | | | | | | Fix document comment blocks Tweak some returns Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100779
* Followup r98053; Add $wgCleanupPresentationalAttributes to the globals setup ↵Daniel Friesen2011-09-251-0/+1
| | | | | | | so that tests are always run with it on. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98056
* Refactor deferrable updates into classes & interfaces, also add helper ↵Chad Horohoe2011-09-101-2/+2
| | | | | | | | | | | method for the most common use case: $wgDeferredUpdateList[] = new HTMLCacheUpdate( $title, "sometable" ); I kept b/c with $wgDeferredUpdateList for now, but seeing as only 3 exts in svn use it (FileSearch, FlaggedRevs and WikiScripts), I'd like to deprecate it pretty soon :) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/96716
* Fix for r96344: explicitly set $wgExtensionAssetsPath during testsMax Semenik2011-09-061-1/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/96349
* Even on Windows, some people have diff ;)Max Semenik2011-09-061-1/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/96341
* Merge ParserTestStaticParserHook into ParserTestParserHook since they ↵Chad Horohoe2011-09-061-1/+0
| | | | | | | practically do the same thing. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/96336
* Some misc fixes to tests:Alexandre Emsenhuber2011-08-161-1/+1
| | | | | | | | * Don't create a WebRequest instance to put in $wgRequest in test since it is meant for HTTP requests, not command line ones * Force $wgAlwaysUseTidy to false in ExtraParserTest, having it to true breaks testBug8689() and testParse() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/94643
* * Call Linker methods staticallyAlexandre Emsenhuber2011-08-051-2/+1
| | | | | | | * Use INSERT IGNORE for the site_stats row (as for the interwiki entries); was throwing query error about duplicate row on my installation Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93980
* (bug 30172) posix_isatty() fallback does not work when the function has been ↵Chad Horohoe2011-08-021-1/+1
| | | | | | | disabled (but exists). While we're at it, make things work for HipHop too. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93789
* Adding __METHOD__ to parameters passed to wfMkdirParents()Sam Reed2011-07-251-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93132
* Remove --upload option to parserTests.php and backend RemoteTestRecorder -- ↵Chad Horohoe2011-06-301-2/+0
| | | | | | | was only used for since-removed CR integration Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/91211
* Pass the Title object to Parser::transformMsg()Alexandre Emsenhuber2011-06-291-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/91067
* * Remove @static from the last few places it's left in core. Please don't ↵Chad Horohoe2011-06-141-1/+0
| | | | | | | | | | use this silly annotation anymore, that's what the static keyword is for. * Enforce protected on SpecialAllPages::getNamespaceKeyAndText(), it's not @private like the comment implies * Drop User::getMaxID(), nothing uses it Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/90026
* Convert a couple of wfDie()s to exceptionsChad Horohoe2011-06-131-3/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/90021
* Per comment on r87680: make parser tests work again.Alexandre Emsenhuber2011-05-231-9/+8
| | | | | | | Can somebody explain me why on earth do we need ParserTest::setUp() since all of this is done before each test in ParserTest::setupGlobals()? Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/88653
* Follow-up r86775: restub $wgLang. Not because it's a good idea, but because ↵Happy-melon2011-04-241-1/+1
| | | | | | | I can't see how to avoid the circular dependencies on it *without* stubbing it. Probably easier to just continue the drive to deprecate the global variable altogether. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86809
* Stop stubbing $wgLang and $wgContLang. There are no major code paths which ↵Happy-melon2011-04-231-1/+1
| | | | | | | do not call either $wgLang or $wgContLang at least once. All index.php calls unstub $wgContLang from MediaWiki::parseTitle() except in the edgecase of viewing pages referenced only by "curid=123", and since those will end up calling OutputPage::output() they will eventually be unstubbed at some point as well. All calls through load.php unstub $wgLang in ResourceLoaderContext::getLanguage() from ResouceLoader::respond() --> ResourceLoader::preloadModuleInfo(). All calls through api.php unstub $wgContLang in ApiResult::cleanUpUTF8() from ApiMain::printResult(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86775
* Breaking the 'math' table setup out to Math extension. Should be the last ↵Brion Vibber2011-04-221-1/+1
| | | | | | | | | | | | | | main step in extension-ification of the math options! The 'math' table will no longer be created on a default install unless you've explicitly enabled the Math plugin at install time; the usual update.php procedure will add it in. Postgres, Oracle, MSSQL, and DB2 variants are included -- broken out from the core files -- but have not been tested. I know there has been some code duplication in parser test infrastructure but could only find one instance of the parser test temporary table setup to remove the 'math' table from (the extension adds it back via the hook). If the phpunit-based runner breaks, please track it down and fix it there too. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86741
* Initial stab at breaking math/texvc out to Math extension.Brion Vibber2011-04-091-2/+0
| | | | | | | | | | | | | | | | | | | | * (bug 14202) $wgUseTeX has been superseded by the Math extension. To re-enable math conversion after upgrading, obtain the Math extension from SVN or from http://www.mediawiki.org/wiki/Extension:Math and add to LocalSettings.php: require_once "$IP/extensions/Math/Math.php"; This is an initial stab, and a few things remain to be cleaned up: * messages need to be moved from core to extension * MW_MATH_* constants should be moved to the extension from core * old back-compat math names interfaces using those constants should be removed from message files * classic edit toolbar's math button should be added from the extension (or else dropped) -- currently there's not a clean hook, but could do it by JS * couple of things like the 'armourMath' function on Language & LanguageConverter may want to be redone just as an unconditional, if that's simpler. Setting $wgUseTeX alone will no longer have any affect. The var's still there for the moment as a few bits still need to be fully moved out from core. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85706
* Quick fix for bug 15892: intermittent SQL-based cache failures during parser ↵Brion Vibber2011-04-081-2/+3
| | | | | | | test runs. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85702
* r85553 fixup. When there are variants involved, the line Platonides2011-04-061-3/+2
| | | | | | | | | $GLOBALS['wgContLang'] = $context->lang; is not assigning $wgContLang the same $langObj instantiated a couple of lines above, but a different object obtained from the user code, breaking variant parsertestsw.. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85581
* Follow-up r85403: fix fatal in parser tests.Happy-melon2011-04-061-0/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85553
* Follow-up r85302: update OutputPage constructors in core.Happy-melon2011-04-051-4/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85403
* Fix E_STRICTMax Semenik2011-03-051-3/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/83297
* Followup r83140: FakeMemCachedClient -> EmptyBagOStuff in testsChad Horohoe2011-03-031-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/83144
* Don't use ob_start/ob_get_contents/ob_end_clean just to var_dump() a string. ↵Platonides2011-02-091-2/+1
| | | | | | | Cleaning var_dump() usage. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/81829
* * Replaced $wgMessageCache by MessageCache::singleton(); since we only use ↵Alexandre Emsenhuber2011-01-261-8/+3
| | | | | | | | | | | one instance of this class (as for ParserCache, LinkCache) * MessageCache::singleton() calls wfGetMessageCacheStorage() directly instead of using $messageMemc, just in case this would be called before that variable is set * Per TimStarling: also removed deprecated methods in MessageCache class: addMessages() and related, [get|set|enable|disable]Transform(), loadAllMessages(), loadMessageFile() and some others. Same for the legacyData stuff in LocalisationCache that was only used by MessageCache::addMessages() and related. * Converted remaining extensions Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/81027
* Explicitely enable language and title conversion otherwise this breaks tests ↵Alexandre Emsenhuber2011-01-241-1/+3
| | | | | | | when disabled in local config Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/80907
* Fix diff output for failed tests on windows, which typically doesn't have a ↵Happy-melon2011-01-161-2/+9
| | | | | | | 'diff' command; use 'fc' instead. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/80429
* Followup r72119, add some bracesSam Reed2011-01-071-0/+1
| | | | | | | Document $db in parserTest Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79783