Commit graph

26 commits

Author SHA1 Message Date
Platonides
c878cd608f r85553 fixup. When there are variants involved, the line
$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..
2011-04-06 21:36:07 +00:00
Happy-melon
f121f89674 Follow-up r85403: fix fatal in parser tests. 2011-04-06 17:39:18 +00:00
Happy-melon
625695317e Follow-up r85302: update OutputPage constructors in core. 2011-04-05 00:06:47 +00:00
Antoine Musso
8012c3b188 debugging statement when starting a phpunit parser test 2011-03-18 21:45:32 +00:00
Platonides
95f1076f20 Remove unused globals 2011-03-06 23:28:32 +00:00
Chad Horohoe
b661588c1f Followup r83140: FakeMemCachedClient -> EmptyBagOStuff in tests 2011-03-03 12:55:22 +00:00
Tim Starling
be76d86932 * Rewrote ObjectCache.php to conform to the modern coding style, and to be less convoluted about how CACHE_ANYTHING and CACHE_ACCEL are resolved. Moved most functionality to static members of a new ObjectCache class.
* Moved the global functions to GlobalFunctions.php, where they are now just convenience wrappers. Made them return non-references. Updated callers (none found in extensions). 
* Added an advanced configuration method, $wgObjectCaches, which allows a lot more detail in the object cache configuration than $wgMainCacheType. 
* Made all object cache classes derive from BagOStuff. 
* Split the MWMemcached class into a generic client class and a MediaWiki-specific wrapper class. The wrapper class presents a simple BagOStuff interface to calling code, hiding memcached client internals, and will simplify the task of supporting the PECL extension.
* Added some extra constructor parameters to MWMemcached, configurable via $wgObjectCaches.
* Removed the *_multi() methods from BagOStuff, my grepping indicates that they are not used.
* Rewrote FakeMemCachedClient as a BagOStuff subclass, called EmptyBagOStuff.
* Added an optional "server" parameter to SQLBagOStuff. This allows the server holding the objectcache table to be different from the server holding the core DB.
* Added MultiWriteBagOStuff: a cache class which writes to multiple locations, and reads from them in a defined fallback sequence. This can be used to extend the cache space by adding disk-backed storage to existing in-memory caches.
* Made MWMemcached::get() return false on failure instead of null, to match the BagOStuff documentation and the other BagOStuff subclasses. Anything that was relying on it returning null would have already been broken with SqlBagOStuff.
* Fixed a bug in the memcached client causing keys with spaces or line breaks in them to break the memcached protocol, injecting arbitrary commands or parameters. Since the PECL client apparently also has this flaw, I implemented the fix in the wrapper class.
* Renamed BagOStuff::set_debug() to setDebug(), since we aren't emulating the memcached client anymore
* Fixed spelling error in MWMemcached: persistant -> persistent
2011-03-03 09:37:37 +00:00
Platonides
e82b7e169c Remove NewParserHelpers.php and use instead the original TestFileIterator from which it was copied in r79411.
Remove the $this->parserTest checks as r79411 did. They are no longer needed. They were here since 
TestFileIterator addition in r62006 back when this file was called parserTests.inc, before being renamed twice 
without preserving history.
The wfDie(); wasn't intended to fall into trunk. It was marking a dead branch and got committed by error in r76149.
2011-02-26 23:45:35 +00:00
Platonides
2e33fb3ff6 Finally commit the testing stuff I have been with this week. Could be considered a continuation of r79411.
Mixture of the NewParserTests.php with old code present in MediaWikiParserTest.php, reverting r79184 (revert of a revert...) and even eval().
Using the iterator as dataProvider, but defering the insertion of articles, as the dataprovider is processed on load, before switching dbs.
Each parser test appear now as a phpunit test. This means that by adding 683 tests (partly from extensions) we now surpass two thousand tests.
The downside of that is that they become painfully slow.
Initialise $wgHooks to $wgHooks, not to array() (r82499) as otherwise we lose ParserFirstCallInit registrations.
There's no attempt to support extensions registering to $wgParser instead of using ParserFirstCallInit properly (Cite falls in this category).
2011-02-26 21:49:42 +00:00
Platonides
32a37f873d Break the self-reference between parser and preprocessor, so they can be counting collected.
Saved a couple of Mb in the destructive make (126.25Mb -> 124.25Mb).
2011-02-20 00:27:01 +00:00
Platonides
bee16714e0 Save and restore $wgHooks in NewParserTest.
ParserGetVariableValueTs hook still being set to ParserTest::getFakeTimestamp was the reason for the crazy failures of MagicVariableTest inside phpunit that I was seeing.
2011-02-20 00:13:26 +00:00
Platonides
db7d7ebd28 Don't use ob_start/ob_get_contents/ob_end_clean just to var_dump() a string. Cleaning var_dump() usage. 2011-02-09 17:21:39 +00:00
Alexandre Emsenhuber
51c6afc751 * Replaced $wgMessageCache by MessageCache::singleton(); since we only use 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
2011-01-26 15:42:04 +00:00
Chad Horohoe
38babb25b5 More silly whitespace 2011-01-10 18:43:59 +00:00
Chad Horohoe
c12dcf7101 rm big whitespace 2011-01-10 18:41:31 +00:00
Platonides
fa08f3be62 $messageMemc is used as local variable in line 63, function setUp
$messageMemc is used as local variable in line 74, function setUp
2011-01-05 23:54:07 +00:00
Sam Reed
da2c995df1 Remove unreachable return;
Add missing global $IP;
2011-01-03 03:40:26 +00:00
X!
9012b54101 Mark broken parser tests as broken 2011-01-03 02:49:52 +00:00
X!
1b4c6a0254 Fix r79447: Remove debugging code 2011-01-01 22:19:22 +00:00
X!
27618d012b Followup r79443: Add some form of organization to the test autoloader 2011-01-01 22:16:54 +00:00
X!
c667c3f1be Reorder functions around, add some form of order to the test suite.
It'd be nice to break some of these functions out to another class, but then again, 
I'd also like to see Windows actually become stable, MediaWiki to become fully class based, 
and Google to stop taking over the world. We can't all have what we want.
2011-01-01 20:57:13 +00:00
X!
2b8f832da8 Add fuzz tests to new parser tests (someone else should make sure this works as expected) 2011-01-01 18:10:28 +00:00
X!
37279160f3 Don't use the --verbose option anymore 2011-01-01 17:05:08 +00:00
X!
332e01addf Add parsertest specific help to PHPUnit.php 2011-01-01 06:49:00 +00:00
X!
f8d74604fd More work on new parser tests:
-No need to specify a new function for each argument, use PHP5 magic to automatically set it
-Create (g|s)etCliArg() functions
-Implement some features from the old parser tests
2011-01-01 05:53:04 +00:00
X!
34fc833407 Start work on porting ParserTests completely into PHPunit.
Disable temporary tables, a few reports of them not working. The tables get deleted anyway, so why risk it?
2011-01-01 03:39:37 +00:00