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'.
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.
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
$