Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

File Size: 447 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: downloader_test  - X-Ref

Downloader tests class for mod_assign.

setupBeforeClass()   X-Ref
Setup to ensure that fixtures are loaded.


test_load_filelist(bool $teamsubmission,array $groupmembers,?array $filterusers,bool $blindmarking,bool $downloadasfolder,array $expected)   X-Ref
Test for load_filelist method.

param: bool $teamsubmission if the assign must have team submissions
param: array $groupmembers the groups definition
param: array|null $filterusers the filtered users (null for all users)
param: bool $blindmarking if the assign has blind marking
param: bool $downloadasfolder if the download as folder preference is set
param: array $expected the expected file list

prepare_filename_text(string $text)   X-Ref
Internal helper to clean a filename text.

param: string $text the text to transform
return: string the clean string

load_filelist_provider()   X-Ref
Data provider for test_load_filelist().

return: array of scenarios

load_filelist_downloadasfiles_scenarios()   X-Ref
Generate the standard test scenarios for load_filelist with download as file.

The scenarios are the same as download as folder but replacing the "/" of the files
by a "_" and setting the downloadasfolder to false.

return: array of scenarios

load_filelist_downloadasfolder_scenarios(string $prefix = "Download as folders:")   X-Ref
Generate the standard test scenarios for load_filelist with download as folder.

param: string $prefix the scenarios prefix
return: array of scenarios