Commit graph

111 commits

Author SHA1 Message Date
Aaron Schulz
eeb4bd77e1 * FU r106752: de-uglified Setup.php by moving most of the b/c code into 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.
2011-12-22 01:06:19 +00:00
Aaron Schulz
53f96171cc FU r106752: use "media-" instead of "images-" in container names. Long live books, video, 3D meshes, and animated holograms from the future! 2011-12-20 23:47:53 +00:00
Aaron Schulz
5275f9b097 Merged FileBackend branch. Manually avoiding merging the many prop-only changes SVN likes to sprinkle in (easy to spot from the change list). Did not add SwiftFileBackend.php as it still is in development. 2011-12-20 03:52:06 +00:00
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Chad Horohoe
d04fac7853 Comment tweak on MediaWikiParserTest and make ResourceLoaderTest extend MediaWikiTestCase 2011-11-12 21:32:39 +00:00
Alexandre Emsenhuber
6efba66c04 Made setupGlobals() return the created context and use it instead of either global variables or recreating more instance of those classes 2011-11-10 12:49:10 +00:00
gicode
08de237f76 Move tests that have likely never been executed. Now they will be executed.
It might be a good idea to have a commit hook or similar to catch these.

You can find candidates for renaming with this command:
$ find tests/phpunit/includes/ -name '*.php' | grep -Ev 'Test.php$' | xargs grep -l MediaWikiTestCase
2011-11-09 23:11:52 +00:00
Platonides
a2db41381e Another old, uncommitted, test (passing on NtPP) 2011-10-31 22:24:26 +00:00
Platonides
2903c6b9a9 Template as parameter name.
I had this test pending longtime, as it is failing in NativePreprocessor.
2011-10-31 22:21:46 +00:00
Platonides
e0afa3b22c The test "{{Foo|1=bar|2=baz}}" got removed in r96887.
Readding without the linestart="1", which is all the difference removed on this file in r96887.
2011-10-29 21:19:08 +00:00
Platonides
796ef5eff2 An alternative to using DOMDocument for normalizing when using Preprocessor_Hash.
Follow-up r99909.
2011-10-28 15:13:27 +00:00
Platonides
6ee7039b29 Follow-up r99909. If there is a preprocessToXml method, use that.
Some preprocessor could have preprocessToObj as a native type.

PHP Fatal error:  Call to a member function __toString() on a non-object in phase3/tests/phpunit/includes/parser/PreprocessorTest.php on line 119
2011-10-28 15:02:10 +00:00
Platonides
58c4ae9c79 Convert the string to single quoted and manually escape it.
http://us.php.net/manual/en/language.types.string.php

addslashes() is convenient, but this way we have no legitimate 
usage, and it's easier to have it banned everywhere.
2011-10-27 21:18:01 +00:00
Sam Reed
6906724935 Add, update, tweak documentation
Fix document comment blocks

Tweak some returns
2011-10-26 03:45:13 +00:00
Antoine Musso
874ae7a731 test that preloaded text is unstripped
bug 27467 reported our preloaded system did not unstrip <nowiki>
or <pre> enclosed text. The fix was applied by r82473.
2011-10-24 10:51:46 +00:00
Antoine Musso
ae87825ed9 test {{SERVERNAME}} with relative URLS
bug 31176 mentionned an issue with {{SERVERNAME}} returning the full
URL instead of servername when using relative URLs (//localhost).
The fix was made by r98193.

This patch test three different URL protocols (http, https & relative)
and check we return the expected 'localhost'.
2011-10-24 09:32:33 +00:00
Antoine Musso
c1f23144e1 using real identity for hashar
Converting my pseudonym to use my real identity instead:
Ashar Voultoiz -> Antoine Musso
2011-10-24 09:08:13 +00:00
Brion Vibber
61bb13a24a Followup r80375: let PreprocessorTest work on Preprocessor_Hash etc as well as Preprocessor_Dom
Using same technique as ApiExpandTemplates to serialize the object tree back to XML, rather than asking for the DOM implementation's internal XML return function.
Have to also perform normalization on the test cases, as they aren't normalized to what libxml2 serializes. :P

Note that there are 4 test failures currently with Preprocessor_Hash, as it makes a separate <equals> element around = which doesn't appear to be in Preprocessor_Dom's output.
2011-10-15 20:21:52 +00:00
Daniel Friesen
7a1d3bf06a Followup r98056; Add to this screwed up NewParserTest phpunit stuff as well. 2011-09-26 02:04:17 +00:00
Brian Wolff
4fc3cd0b22 Make the phpunit old-style parserTest converter thingy not fall on its face if an extension registers a parserTests test file that has a period in it. 2011-09-18 03:32:43 +00:00
Aaron Schulz
23d5a27e2e Reverted r86072, r86419 per CR. Lots of conflicts resolved here. Removes lineStart from r87346 code as well for preprocess parser tests. 2011-09-12 19:16:22 +00:00
Max Semenik
02b2c6c8db Fix for r96344: explicitly set $wgExtensionAssetsPath during tests 2011-09-06 16:47:05 +00:00
Chad Horohoe
df19f6cdea Merge ParserTestStaticParserHook into ParserTestParserHook since they practically do the same thing. 2011-09-06 14:46:58 +00:00
Platonides
9d98f581bb Manually set the title as not being a redirect. Otherwise,
it needed a database from Parser::getFunctionLang() -> 
Title::getPageLanguage() -> Title::isRedirect()
2011-08-27 21:10:41 +00:00
Brian Wolff
c909720031 Follow-up r94680 - fix unit tests.
The way the magic variable unit tests are run looks a little sketchy to me...
2011-08-17 00:46:58 +00:00
Chad Horohoe
1015bf5986 Followup r94678: remove some include and autoload entries. tests still passing 2011-08-16 19:25:26 +00:00
Chad Horohoe
b11588e827 Remove ParserHelpers. NewParserTest still needs some cleanup, but it doesn't rely on this. All tests still pass. 2011-08-16 19:18:07 +00:00
Alexandre Emsenhuber
062e2723ba Some misc fixes to tests:
* 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()
2011-08-16 15:17:35 +00:00
Chad Horohoe
5f8e4b019b Move the fuzz test into @group Broken so it will shut up about being incomplete 2011-08-09 16:13:56 +00:00
Alexandre Emsenhuber
762c3f8204 * Call Linker methods statically
* Use INSERT IGNORE for the site_stats row (as for the interwiki entries); was throwing query error about duplicate row on my installation
2011-08-05 15:17:19 +00:00
Chad Horohoe
04b80879ce Partial fix for r88772: no need for IGNORE on site_stats, just interwiki 2011-08-04 23:14:17 +00:00
Sam Reed
66e01d1bb7 Adding __METHOD__ to parameters passed to wfMkdirParents() 2011-07-25 22:01:19 +00:00
Chad Horohoe
d80b53f982 self rv r90483. Still needs investigating though 2011-07-21 22:04:55 +00:00
Alexandre Emsenhuber
f82b49e02b Pass the Title object to Parser::transformMsg() 2011-06-29 10:58:54 +00:00
Chad Horohoe
d12cc8a163 Mark test incomplete for a legitimate reason like trying to serialize a PDO object--rather than imaginary ones such as blaming memory_limit being too low when the test was being stupid and lowering it for us. 2011-06-20 20:24:53 +00:00
Platonides
efbd16e825 Copy teardownUploadDir(),deleteFiles(),deleteDirs() from parserTest.inc Move down teardownGlobals()
This almost fixes the issue of hundreds of leaking mwParser-*-images files at temp dir.
For some unknown reason, there's still one instance left, though.

PS: I thought I had committed this time ago...
2011-06-16 21:07:37 +00:00
Chad Horohoe
c954cb7a4c * Remove @static from the last few places it's left in core. Please don't 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
2011-06-14 01:56:55 +00:00
Happy-melon
295f513e8b More unpicking of r85288. I think this is all of the magic method calls, but they're very hard to grep for (part of the problem with them!), so let's leave the calls in with a wfDeprecated() for a while... 2011-06-03 11:04:49 +00:00
Chad Horohoe
db833df9dc Remove useless bootstrap inclusions 2011-06-03 04:25:21 +00:00
Antoine Musso
dacec03bde really add NewParserTest to the Stub group
PHPUnit 5.3.13 does not like having comments after the '@group name' command.
This class was not part of the Stub group and run despite the exclusion of
the Stub group in our suite.xml

Properly fix issue described in r89223 and complete r89226
2011-05-31 20:35:35 +00:00
Platonides
6c2654b7f8 Revert r89223. MediaWikiParserTest is needed to run all the $wgParserTestFiles
NewParserTest.php standalone running of the first $wgParserTestFiles item is just a convenience.
2011-05-31 20:30:12 +00:00
Antoine Musso
d24a26e713 NewParserTest.php can now work independently
PHPUnit load class according to their order on the filesystem I guess.
On the cruisecontrol host, it first load NewParserTest.php and run
the test then load MediaWikiParserTest.php which run the tests too!

On my host the order is reversed, and NewParserTest.php is never run
for a reason I have not investigated.

Anyway, deleting the MediaWikiParserTest.php is harmless since it is
redundant with NewParserTest.php

(should fix cruise control)
2011-05-31 19:51:48 +00:00
Chad Horohoe
b7bc5a8db5 Workaround for duplicate key errors 2011-05-25 00:49:51 +00:00
Chad Horohoe
26ec01f63c Extend MediaWikiTestCase in a few places 2011-05-25 00:30:06 +00:00
Happy-melon
8ff0177e98 Follow-up r85403: rm unwanted "new" declaration. 2011-05-23 18:57:30 +00:00
Alexandre Emsenhuber
236e3fd6c6 Follow-up r88653: removed the remaining of OutputPage's stubbing 2011-05-23 17:53:31 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Platonides
e849a1f153 Tag names can't contain template parameters (thanksfully) 2011-05-04 14:40:25 +00:00
Platonides
cbceed01fa Follow up r87220. r86795 tests are now embedded into PreprocessorTest.php 2011-05-03 19:53:13 +00:00
Platonides
c6a8d96092 We can't check if it's a parentNode->type == name_node so early, since
it may be just a single } and end up being a literal.
2011-05-03 19:48:50 +00:00