From 278210a26b7e09eab43b2314d374dec84aca4300 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 10 Dec 2012 12:03:13 +0100 Subject: [PATCH] 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 | 1 + 1 file changed, 1 insertion(+) 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() { -- 2.20.1