Commit graph

17 commits

Author SHA1 Message Date
Antoine Musso
5f7fca71cf Force wgDebugTimestamps false
Test GlobalTest::testDebugFunctionTest() does not take into account the setting
$wgDebugTimestamps = true.  Setting it false makes sure the tests pass though
not testing the settings :(
2011-02-20 17:44:37 +00:00
Antoine Musso
df928851f6 wfShorthandToInteger() PHPUnit code coverage
Some easy assertions.

$ php phpunit.php --configuration suite.xml --filter Shorthand
PHPUnit 3.5.10 by Sebastian Bergmann.
...........................
Time: 2 seconds, Memory: 22.00Mb
OK (27 tests, 27 assertions)
2011-02-06 18:02:47 +00:00
Antoine Musso
8f45c9e03a bugfix for wfBCP47 and code coverage
Language code are case insensitive. The BCP 47 recommands nice
formatting nonetheless. This patch enhance our formatting:
- tags preceded by the private tag 'x' are now lower case
- 4 letters tags are now lower case with first letter uper cased

Please note the RFC seems to have a bug for az-Arab-x-AZE-derbend
which should be az-Arab-x-aze-derbend .  I have changed our test
to reflect this and added a comment for later reference.
2011-02-06 14:47:35 +00:00
Antoine Musso
da4f37facd Improve PHPUnit code coverage
XmlJs:
 - simple class == simple test

GlobalFunctions:
 - wfArrayDiff2: simple test, please add more

XmlSelectTest:
 - test for constructor
 - tests for setDefault. Found a potential bug when setting a default after
   options have been added. The default option will not get marked as selected!
   We should change our code to generates HTML for options at rendering time
   or throw an exception that default can not be used if an option is present.

MediaWiki:
 - basic placeholder generated by PHPUnit
 - tests for setVal() / getVal()
2011-02-06 13:59:06 +00:00
X!
3e36a442e7 Forcing array breaks MWFunction with <2 parameters 2011-01-04 01:51:48 +00:00
X!
e1f21873d5 Fix r79494: Don't prefix functions now that they're in their own class 2011-01-04 01:44:11 +00:00
X!
cbff3fe980 Followup to r79463: Move fallback functions to new Fallback class 2011-01-02 15:54:18 +00:00
X!
7d686e0164 GlobalFunction additions:
-in_string has a case-insensitive option
-wfClientAcceptsGzip has a force option to force resetting the static value, useful for unit tests

Unit tests for more global functions added
2011-01-02 04:38:04 +00:00
X!
317721e250 Add more wfDebug tests 2011-01-02 02:33:07 +00:00
X!
496ff9d410 Followup r79467: Add more wfDebug() tests, complete with MockOutputPage 2011-01-02 02:16:32 +00:00
X!
9d29978252 Add some wfDebug() unit tests 2011-01-02 01:59:52 +00:00
X!
e2c7b2ce23 Add fallback mb_* function tests 2011-01-02 01:51:44 +00:00
Platonides
62f2f7b879 Fix r71751 problems with textual parameters.
Add a test for checking the problems which appeared in r71751
2010-12-30 16:10:42 +00:00
Chad Horohoe
447529064b * verbose and color default output from phpunit
* Make a bunch of tests subclass MediaWikiTestCase
* Parser tests and ResourceLoaderTest can't subclass it yet due to various issues
2010-12-28 18:17:16 +00:00
X!
eb0611a171 assertType() is deprecated, switching usages tp assertInternalType() and assertInstanceOf() 2010-12-28 15:13:42 +00:00
Platonides
ac322a21e1 Add a couple of comments from my WC 2010-12-24 12:08:47 +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