mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-48605 unit_test: Only touch real file/dir
This commit is contained in:
parent
d421a973d1
commit
d83a1c11a2
@ -395,8 +395,10 @@ class core_scheduled_task_testcase extends advanced_testcase {
|
||||
$iter = new \RecursiveIteratorIterator($dir, \RecursiveIteratorIterator::CHILD_FIRST);
|
||||
|
||||
for ($iter->rewind(); $iter->valid(); $iter->next()) {
|
||||
$node = $iter->getRealPath();
|
||||
touch($node, time() - (8 * 24 * 3600));
|
||||
if ($iter->isDir() && !$iter->isDot()) {
|
||||
$node = $iter->getRealPath();
|
||||
touch($node, time() - (8 * 24 * 3600));
|
||||
}
|
||||
}
|
||||
|
||||
// Run the scheduled task again to remove all of the files and directories.
|
||||
|
Loading…
x
Reference in New Issue
Block a user