diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index f332a579ea1..d54fde84bdb 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -143,7 +143,7 @@ if ( !$hasIntegrationTests ) { // For simplicity, getPHPUnitExtensionsAndSkins uses `\n\nTESTPATHS\n\n` to separate the lists of JSON files and // additional test paths, so split the output into the individual lists. [ $pathsToJsonFilesStr, $testPathsStr ] = explode( "\n\nTESTPATHS\n\n", $extensionData ); - $pathsToJsonFiles = explode( "\n", $pathsToJsonFilesStr ); + $pathsToJsonFiles = $pathsToJsonFilesStr ? explode( "\n", $pathsToJsonFilesStr ) : []; $testPaths = explode( "\n", $testPathsStr ); $extensionProcessor = new ExtensionProcessor(); diff --git a/tests/phpunit/getPHPUnitExtensionsAndSkins.php b/tests/phpunit/getPHPUnitExtensionsAndSkins.php index e0d45ca2d3f..fe9a682fe4b 100755 --- a/tests/phpunit/getPHPUnitExtensionsAndSkins.php +++ b/tests/phpunit/getPHPUnitExtensionsAndSkins.php @@ -36,6 +36,7 @@ echo "\n\nTESTPATHS\n\n"; // just the config needed to create a hook container, as early as when ExtensionsTestSuite::suite is called. // This particular hack can be removed once the UnitTestsList hook is removed (T298509) $registry = ExtensionRegistry::getInstance(); +$paths = []; foreach ( $registry->getAllThings() as $info ) { $paths[] = dirname( $info['path'] ) . '/tests/phpunit'; }