MDL-71367 unit tests: Add missing ->destroy() call to test backups

As part of the tests preparations, some backups are created, but
the tests aren't calling to their ->destroy() method at the end.

The destroy() method is needed to go cleaning and unsetting various
objects that, only then, will free resources, like memory, open files...

This isn't critical under Unix OSs... but Windows is really sensible
and keeps all open files locked, so any write operation on them fails.
This commit is contained in:
Eloy Lafuente (stronk7)
2021-04-19 00:03:46 +02:00
parent 9600becce3
commit c86f286543
@@ -60,6 +60,7 @@ class core_backup_cleanup_task_testcase extends advanced_testcase {
$user->id
);
$controller->execute_plan();
$controller->destroy(); // Unset all structures, close files...
return $controller->get_backupid();
}