wfWarn() should cause phpunit tests to fail.
authordaniel <daniel.kinzler@wikimedia.de>
Mon, 27 Aug 2012 12:28:47 +0000 (14:28 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Mon, 27 Aug 2012 12:28:47 +0000 (14:28 +0200)
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

tests/phpunit/phpunit.php

index 61a20f1..e4a90d8 100755 (executable)
@@ -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;