From: daniel Date: Mon, 27 Aug 2012 12:28:47 +0000 (+0200) Subject: wfWarn() should cause phpunit tests to fail. X-Git-Tag: 1.31.0-rc.0~22588^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=4b291909e0e91ad4e8ed98030c1312a872ca3bd4;p=lhc%2Fweb%2Fwiklou.git wfWarn() should cause phpunit tests to fail. This forces $wgDevelopmentWarnings to true for phpunit tests. Note that wfWarn uses the E_USER_NOTICE level per default, which may or may not actually cause test cases to fail, depending on the phpunit configuration. Change-Id: I36583fb063436cc8474873b468fc983d28377cbd --- diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php index 61a20f1b1f..e4a90d8a16 100755 --- a/tests/phpunit/phpunit.php +++ b/tests/phpunit/phpunit.php @@ -34,6 +34,10 @@ class PHPUnitMaintClass extends Maintenance { global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType; global $wgLanguageConverterCacheType, $wgUseDatabaseMessages; global $wgLocaltimezone, $wgLocalisationCacheConf; + global $wgDevelopmentWarnings; + + // wfWarn should cause tests to fail + $wgDevelopmentWarnings = true; $wgMainCacheType = CACHE_NONE; $wgMessageCacheType = CACHE_NONE;