From: daniel Date: Mon, 10 Dec 2012 11:03:13 +0000 (+0100) Subject: Make --wiki work with phpunit.php. X-Git-Tag: 1.31.0-rc.0~21313 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=278210a26b7e09eab43b2314d374dec84aca4300;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/tests/phpunit/MediaWikiPHPUnitCommand.php b/tests/phpunit/MediaWikiPHPUnitCommand.php index 2745c6a0f4..b675000afe 100644 --- a/tests/phpunit/MediaWikiPHPUnitCommand.php +++ b/tests/phpunit/MediaWikiPHPUnitCommand.php @@ -9,6 +9,7 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command { 'keep-uploads' => false, 'use-normal-tables' => false, 'reuse-db' => false, + 'wiki=' => false, ); public function __construct() {