phpunit: Fix bootstrap script when no extensions are installed
Change-Id: I9de2c7711fc41f83a0b9e6783fcf085cedb2a9c9 (cherry picked from commit 2544c2cd31fefece71adc0ec03112614e41bd9ec)
This commit is contained in:
parent
1364192bb9
commit
3f2281da04
2 changed files with 2 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue