Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

(no description)

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

Defines 1 class

cronlib_test:: (3 methods):
  cron_delete_from_temp_provider()
  generate_test_path()
  test_cron_delete_from_temp()


Class: cronlib_test  - X-Ref

Unit tests for the cron.

cron_delete_from_temp_provider()   X-Ref
Data provider for cron_delete_from_temp.

return: array Provider data

generate_test_path($path, $isdir = false, $time = 0, $keep = false)   X-Ref
Function to populate node array.

param: string $path Path of directory or file
param: bool $isdir Is the node a directory
param: int $time modified time of the node in epoch
param: bool $keep Should the node exist after the delete function has run

test_cron_delete_from_temp($nodes, $expected)   X-Ref
Test removing files and directories from tempdir.

param: array $nodes List of files and directories
param: array $expected The expected results