Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]
Unit tests for /lib/filestorage/tgz_packer.php and tgz_extractor.php.
Copyright: | 2013 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 467 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_files_tgz_packer_testcase:: (14 methods):
file_put_contents_at_time()
prepare_file_list()
test_get_packer()
test_to_normal_files()
test_to_stored_files()
test_only_specified_files()
test_extract_to_pathname_returnvalue_successful()
test_extract_to_pathname_returnvalue_failure()
test_file_progress()
test_list_files()
convert_info_for_assert()
test_is_tgz_file()
check_progress_toward_max()
progress()
Class: core_files_tgz_packer_testcase - X-Ref
file_put_contents_at_time($path, $contents, $mtime) X-Ref |
Puts contents with specified time. param: string $path File path param: string $contents Contents of file param: int $mtime Time modified |
prepare_file_list() X-Ref |
Set up some files to be archived. return: array Array listing files of all types |
test_get_packer() X-Ref |
Tests getting the item. |
test_to_normal_files() X-Ref |
Tests basic archive and extract to file paths. |
test_to_stored_files() X-Ref |
Tests archive and extract to Moodle file system. |
test_only_specified_files() X-Ref |
Tests extracting with a list of specified files. |
test_extract_to_pathname_returnvalue_successful() X-Ref |
Tests extracting files returning only a boolean state with success. |
test_extract_to_pathname_returnvalue_failure() X-Ref |
Tests extracting files returning only a boolean state with failure. |
test_file_progress() X-Ref |
Tests the progress reporting. |
test_list_files() X-Ref |
Tests the list_files function with and without an index file. |
convert_info_for_assert(array $files) X-Ref |
Utility function to convert the file info array into a simpler format for making comparisons. param: array $files Array from list_files result |
test_is_tgz_file() X-Ref |
No description |
check_progress_toward_max() X-Ref |
Checks that progress reported is numeric rather than indeterminate, and follows the progress reporting rules. |
progress($progress = file_progress::INDETERMINATE, $max = file_progress::INDETERMINATE) X-Ref |
Handles file_progress interface. param: int $progress param: int $max |