Commit graph

12 commits

Author SHA1 Message Date
Sam Reed
30dff02424 Fixup the rest of r82577 2011-08-24 20:14:03 +00:00
Sam Reed
98d2168ffb Fix testGetTalkExceptions from r82577 2011-08-24 19:52:24 +00:00
Sam Reed
365f043fd5 Followup r82577
Remove $this->object

Swap assertEquals parameters
2011-08-24 19:32:40 +00:00
Antoine Musso
08334c06c8 Fix up NS_MAIN subpage tests
Per CR on r92234, this correctly test hasSubpages independently from your
local configuration.  Also test altering the global and having static
methods reacting accordingly.
2011-08-15 14:17:45 +00:00
Platonides
e9c95dbb4a Commit a list of unimplemented tests. 2011-07-20 15:38:13 +00:00
Antoine Musso
76496b0e02 NS_MAIN can locally have subpages enabled
This workaround test if any local change has been made, if so the test
will be skipped.

fu r82577
2011-07-15 09:45:57 +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
3ec5811451 Fix MWNamespaceTest::testGetTalkExceptions()
It was actually testing for associated. Thanks copy & paste for this bug.

Test result:

$ php phpunit.php -c suite.xml includes/MWNamespaceTest.php
.........IIIII..........
Tests: 24, Assertions: 99, Incomplete: 5.
2011-05-14 12:01:08 +00:00
Platonides
49ed86e93f Remove trailing ?> 2011-02-22 15:09:41 +00:00
Antoine Musso
e9149c09f0 remove hardcoded local path 2011-02-21 22:56:16 +00:00
Antoine Musso
f909c62d64 improve namespace related methods
MWNamespace::getTalk() could give erroneus results when using it on specials
namespaces (NS_MEDIA, NS_SPECIAL). It now use MWNamespace::isMethodValidFor()
which will throw an exception if a special namespace was given.

MWNamespace::getSubject() is now returning identity for specials namespaces.

New MWNamespace::getAssociated() used to find out the subject page of a talk
page and vice versa. Special namespaces will results in an exception.


TESTS:

Added tests for almost complete code coverage. Functions relying on global
$wgCanonicalNamespaces are still incomplete though.
MWNamespace::isMovable() needs more assertions.

Tests results (ignoring incomplete tests output):

$ php phpunit.php --filter MWNamespace
PHPUnit 3.5.10 by Sebastian Bergmann.

.........IIIII..........

Time: 1 second, Memory: 31.75Mb

OK, but incomplete or skipped tests!
Tests: 24, Assertions: 99, Incomplete: 5.
2011-02-21 22:17:06 +00:00