MDL-46375 core_files: Correct filename in mbz test
commit0c03db6a32fb217756e091b691f1e885b608781b
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 8 Feb 2017 05:14:51 +0000 (8 13:14 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 14 Feb 2017 00:42:28 +0000 (14 08:42 +0800)
tree94a6427cf6b0567f3bfbeec2197644c6066bb52d
parent16a34ae1892014a6ca3055a95ac7310442529a6c
MDL-46375 core_files: Correct filename in mbz test

I noticed during the file system abstraction that this test was
incorrect.

Since both $storagefalse, and $storagetrue are in the same context,
component, area, itemid, and folder, the fact that they had the same
filename meant that they constantly overwrote one another.

As part of archive_to_storage, existing files in the same location are
found, the files themselves deleted, and the existing file record in the
files table is deleted.

The tests continued to pass because:
* the existing variables were not affected by the deletion of the file
  record and file so the comparisons were successful; and
* subsequent calls to fetch the content of the file meant that the
  files themselves were restored from the trash directory.
lib/filestorage/tests/mbz_packer_test.php