SpecialPageTest seems to assume
the first database user has ID number 1.
In case of the current PostgreSQL test
setup it does not have to be the case.
This query:
Query pgtest01 (101) (slave):
SELECT /* User::loadFromDatabase 127.0.0.1
*/ user_id /* more fields */ FROM "unittest_mwuser"
WHERE user_id = '1' LIMIT 1
fails, because UTSysop has been added by the
test setup before with some other ID:
Query pgtest01 (65) (slave):
INSERT /* User::addToDatabase 127.0.0.1 */
INTO "unittest _mwuser"
(user_id,user_name /* more fields */
VALUES ('322','UTSysop' /* more values */
Change-Id: I7b0a6a9001765111669051d57e675e588b71ba17
These are protected in the parent MediaWikiTestCase and
PHPUnit_Framework_TestCase. No good reason to make them public.
Change-Id: I45ecc0e4209f0c3b27e63a550112e4e0ddf6e530
The way the existing code was, it seems the exception condition
was never hit, as one could enter a bogus special page title in
SpecialPage::getTitleFor and it returns a Title object anyway.
Some tests are also added for SpecialPage::getTitleFor(),
although more refactoring my be required to truly unit test this,
vs. indirectly testing other stuff via static methods.
Change-Id: I6e427d047a2f8e58677eb65b50866f767078c255