Commit graph

16 commits

Author SHA1 Message Date
Chad Horohoe
d04fac7853 Comment tweak on MediaWikiParserTest and make ResourceLoaderTest extend MediaWikiTestCase 2011-11-12 21:32:39 +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
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
Chad Horohoe
1015bf5986 Followup r94678: remove some include and autoload entries. tests still passing 2011-08-16 19:25:26 +00:00
Chad Horohoe
db833df9dc Remove useless bootstrap inclusions 2011-06-03 04:25:21 +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
Platonides
95f1076f20 Remove unused globals 2011-03-06 23:28:32 +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
X!
9012b54101 Mark broken parser tests as broken 2011-01-03 02:49:52 +00:00
X!
194ab8bb57 Self-reverting my reversion of r79154 in r79158. The old version is flawed and broken beyond belief. At least this version works. 2010-12-29 16:40:31 +00:00
X!
05c6b53899 Partial revert of r79154. hexmode asserts that these work, even though I keep getting OK (0 tests, 0 assertions) 2010-12-29 03:35:17 +00:00
X!
edbf743aeb Make MediaWikiParserTest work now in PHPUnit. There are still a few bugs, such as stopping tests if one fails,
lack of fuzz testing and other parser test options, and the DB creation is still a little flaky.
A MediaWikiPHPUnitCommand class had to be created to allow for custom CLI parameters.
2010-12-29 02:23:51 +00:00
Chad Horohoe
5f528203aa Rename MediaWikiTestSetup to MediaWikiTestCase: this is going to be the base class for all unit tests from now on 2010-12-28 17:45:33 +00:00
Chad Horohoe
65652a6f33 Fix path changes from move in r78383 2010-12-14 16:33:06 +00:00
Chad Horohoe
23f69f10ed Per wikitech-l discussion: Move tests from maintenance/tests/ to tests/. They're not strictly maintenance scripts, and some people want to do a selective checkout that doesn't include the tests. There's still debate on whether we should include these in the release downloads, but we had a pretty firm consensus to move this. 2010-12-14 16:26:35 +00:00