Make --wiki work with phpunit.php.
authordaniel <daniel.kinzler@wikimedia.de>
Mon, 10 Dec 2012 11:03:13 +0000 (12:03 +0100)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 13 Dec 2012 13:11:36 +0000 (13:11 +0000)
commit278210a26b7e09eab43b2314d374dec84aca4300
treefb42b541abcd08a00191ff8856bdc48a27e6d1a1
parent963ddaede51d59c1bbbdc25b6d14dbd8501b7d40
Make --wiki work with phpunit.php.

This introduces --wiki as a dummy paramter to the PHPUnit job, so it no
longer complains and errors our. The parameter is already picked up
correctly be Maintenance.php.

I have a wiki family setup with a Wikibase repo and client using the
same install base, and the same LanguageSettings.php. Different
databases etc are triggered based on the request URI or, for maintenance
scripts, by the --wiki paramters.

I can run maintenance scripts etc against the client setup using --wiki
client. But how do I run unit tests against the client setup? If I try:

  $ phpunit.php --wiki client
  unrecognized option --wiki
  $

That's because after Maintenances.inc (correctly) processes the command
line parameters, phpunit also tries to process them - and complains,
because it doesn't know --wiki.

This change introduces --wiki as a dummy parameter to phpunit to work
around this. With this patch applied, I can run unit tests against my
client setup using phpunit.php --wiki client as expected.

Change-Id: I6cf319cdbdf55a541c986838d370aa324994ae78
tests/phpunit/MediaWikiPHPUnitCommand.php