Commit b21ae4cc authored by Marc Egger's avatar Marc Egger
Browse files

Refs #11926 : remove form_phpunit before running new unit tests

parent 2635737a
Pipeline #4989 passed with stages
in 3 minutes and 53 seconds
......@@ -6,4 +6,17 @@ require dirname(__DIR__).'/vendor/autoload.php';
Path::setProjectToForm(Path::PROJECT_TO_FORM_PHPUNIT);
Path::setProjectToReport(Path::PROJECT_TO_REPORT_PHPUNIT);
Path::setMainPaths();
\ No newline at end of file
Path::setMainPaths();
// remove old form_phpunit directory and all its content
$absoluteForm = Path::absoluteProject(Path::PROJECT_TO_FORM_PHPUNIT); // DEBUG
if(file_exists($absoluteForm)) {
$absoluteBackup = Path::join($absoluteForm, Path::FORM_TO_FORM_BACKUP);
if(file_exists($absoluteBackup)) {
array_map('unlink', glob("$absoluteBackup/*.db"));
array_map('unlink', glob("$absoluteBackup/*.file"));
rmdir($absoluteBackup);
}
array_map('unlink', glob("$absoluteForm/*.json"));
rmdir($absoluteForm);
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment