Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Unit tests for /lib/filestorage/zip_packer.php and zip_archive.php

Copyright: 2012 Petr Skoda
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 722 lines (28 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_files_zip_packer_testcase  - X-Ref

setUp()   X-Ref


test_get_packer()   X-Ref
No description

test_list_files()   X-Ref


test_archive_to_pathname()   X-Ref


test_archive_to_storage()   X-Ref


test_extract_to_pathname()   X-Ref


test_zip_entry_path_having_folder_ending_with_dot()   X-Ref
Test functionality of {@see zip_packer} for entries with folders ending with dots.


test_extract_to_pathname_onlyfiles()   X-Ref


test_extract_to_pathname_returnvalue_successful()   X-Ref


test_extract_to_pathname_returnvalue_failure()   X-Ref


test_extract_to_storage()   X-Ref


test_add_files()   X-Ref


test_close_archive()   X-Ref
No description

test_open_archive()   X-Ref


test_open_encrypted_archive()   X-Ref
Test opening an encrypted archive


test_file_progress()   X-Ref
Tests the progress reporting.


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