resourceloader: Fix testMakeModuleResponseError() failure on Travis
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 22 Feb 2017 02:51:45 +0000 (18:51 -0800)
committerKrinkle <krinklemail@gmail.com>
Wed, 22 Feb 2017 02:56:30 +0000 (02:56 +0000)
> 1) ResourceLoaderTest::testMakeModuleResponseError
> Failed asserting that '[e08c982d974548127cb5d7ce] Fatal exception of type Exception'
> matches PCRE pattern "/Ferry not found/".
> .../ResourceLoaderTest.php:519

This happened on Travis CI, because ResourceLoader::formatException() behaves
differently based on $wgShowExceptionDetails. Which is enabled in Vagrant
and Jenkins, but disabled by default (and thus in Travis CI builds).

Bug: T75176
Change-Id: If15dd03213703b7b6ff899cad5e5569e2515b378

tests/phpunit/includes/resourceloader/ResourceLoaderTest.php

index cde1e5a..e0a82d0 100644 (file)
@@ -18,6 +18,7 @@ class ResourceLoaderTest extends ResourceLoaderTestCase {
                        // to avoid notices during testMakeModuleResponse for missing
                        // wgResourceLoaderLESSVars keys in extension hooks.
                        'wgHooks' => [],
+                       'wgShowExceptionDetails' => true,
                ] );
        }