phpunit: Add more info to LocalSettings.php error in MediaWikiIntegrationTestCase
authorTimo Tijhof <krinklemail@gmail.com>
Sun, 1 Sep 2019 20:34:35 +0000 (21:34 +0100)
committerKrinkle <krinklemail@gmail.com>
Sun, 1 Sep 2019 21:29:02 +0000 (21:29 +0000)
Change-Id: I3df68aab40f4b0bb1d5134330347d77ed3399f02

tests/phpunit/MediaWikiIntegrationTestCase.php

index b1eb9ef..ed03a14 100644 (file)
@@ -182,8 +182,10 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
                global $IP;
                parent::setUpBeforeClass();
                if ( !file_exists( "$IP/LocalSettings.php" ) ) {
-                       echo 'A working MediaWiki installation with a configured LocalSettings.php file is'
-                       . ' required for tests that extend ' . self::class;
+                               echo "File \"$IP/LocalSettings.php\" could not be found. "
+                               . "Test case " . static::class . " extends " . self::class . " "
+                               . "which requires a working MediaWiki installation.\n"
+                               . ( new RuntimeException() )->getTraceAsString();
                        die();
                }
                self::initializeForStandardPhpunitEntrypointIfNeeded();