N°4771 Fix .make/composer/rmDeniedTestDir.php doing nothing on Windows

Note that a .gitignore entry was added in dbc3da7b but it isn't necessary if rmDeniedTestDir work as expected !
This commit is contained in:
Pierre Goiffon
2022-02-10 12:06:35 +01:00
parent e89090f0ec
commit 2e45b20fc4
2 changed files with 8 additions and 5 deletions

View File

@@ -27,7 +27,10 @@ use RecursiveIteratorIterator;
class iTopComposer
{
/**
* @return array List of all subdirs of /lib that are {@see IsTestDir}.
* Warning : each path contains slashes (meaning on Windows you'll get eg `C:/Dev/wamp64/www/itop-27/lib/goaop/framework/tests`)
*/
public function ListAllTestDir()
{
$aAllTestDirs = array();
@@ -49,7 +52,9 @@ class iTopComposer
continue;
}
$aAllTestDirs[] = $file->getRealpath();
$sTestPathDir = $file->getRealpath();
$sTestPathDir = str_replace('\\', '/', $sTestPathDir);
$aAllTestDirs[] = $sTestPathDir;
}
return $aAllTestDirs;
@@ -86,6 +91,7 @@ class iTopComposer
$APPROOT_WITH_SLASHES.'lib/nikic/php-parser/test',
$APPROOT_WITH_SLASHES.'lib/pear/archive_tar/tests',
$APPROOT_WITH_SLASHES.'lib/pear/console_getopt/tests',
$APPROOT_WITH_SLASHES.'lib/pear/pear_exception/tests',