MDL-71367 unit tests: Add missing ->destroy() call to test backups
commitc86f286543eea6f65ac03c35020acdb2c47a6768
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 18 Apr 2021 21:43:13 +0000 (18 23:43 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 18 Apr 2021 22:03:46 +0000 (19 00:03 +0200)
tree2c43e89d7f6c314070b13d14f0e88b7f5cd4598f
parent9600becce358ff8ad22a03de4d358279e7a10ed5
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.
backup/tests/backup_cleanup_task_test.php