Issue #3150731 by andypost, Beakerboy, kim.pepper: FileSystemModuleDiscoveryDataProviderTrait needs to use DIRECTORY_SEPARATOR
(cherry picked from commit a804607c4150265ad0e6e2fd2335011c3269c8ce)merge-requests/64/head
parent
ea57e3ac3d
commit
b096f36ef6
|
@ -14,9 +14,10 @@ trait FileSystemModuleDiscoveryDataProviderTrait {
|
|||
* An array of module names to test.
|
||||
*/
|
||||
public function coreModuleListDataProvider() {
|
||||
$module_dirs = array_keys(iterator_to_array(new \FilesystemIterator(__DIR__ . '/../../../modules/')));
|
||||
$module_names = array_map(function ($path) {
|
||||
return str_replace(__DIR__ . '/../../../modules/', '', $path);
|
||||
$prefix = dirname(__DIR__, 3) . DIRECTORY_SEPARATOR . 'modules';
|
||||
$module_dirs = array_keys(iterator_to_array(new \FilesystemIterator($prefix)));
|
||||
$module_names = array_map(function ($path) use ($prefix) {
|
||||
return str_replace($prefix . DIRECTORY_SEPARATOR, '', $path);
|
||||
}, $module_dirs);
|
||||
$modules_keyed = array_combine($module_names, $module_names);
|
||||
|
||||
|
|
Loading…
Reference in New Issue