Commit graph

6 commits

Author SHA1 Message Date
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
26ec01f63c Extend MediaWikiTestCase in a few places 2011-05-25 00:30:06 +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
Antoine Musso
7675773aa9 Move some providers in new MediaWikiProvide class
The MediaWikiProvide class would host providing methods reused in different
tests classes.  To use it, just use the Class::function syntax.

Example:
  /** @dataProvider MediaWikiProvide::Months */

Made a svn copy of phpunit/includes/parser/MagicVariableTest.php
to save the history.
2011-02-06 21:28:57 +00:00
Antoine Musso
596956c928 Test suite for revisions and date related magic variables.
Tests should be carefully reviewed, please note there is are exceptions
for 'revisionday' and 'revisionmonth1' magics which are hardcoded in
the parser to return an integer.

Follow up r66200

TESTS:

$ php phpunit.php -c suite.xml --filter MagicVariable --testdox
PHPUnit 3.5.10 by Sebastian Bergmann.

MagicVariable
 [x] Currentday is un padded
 [x] Currentdaytwo is zero padded
 [x] Localday is un padded
 [x] Localdaytwo is zero padded
 [x] Currentmonth is zero padded
 [x] Currentmonthone is un padded
 [x] Localmonth is zero padded
 [x] Localmonthone is un padded
 [x] Revisionday is un padded
 [x] Revisiondaytwo is zero padded
 [x] Revisionmonth is zero padded
 [x] Revisionmonthone is un padded
$
2011-02-02 21:04:21 +00:00