Search moodle.org's
Developer Documentation

See Release Notes

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

(no description)

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

Defines 1 class


Class: entries_exporter_test  - X-Ref

Unit tests for entries_exporter and csv_entries_exporter classes.

Also {@see entries_export_test} class which provides module tests for exporting entries.

test_get_records_count(array $rows, int $expectedcount)   X-Ref
Tests get_records_count method.

param: array $rows the rows from the data provider to be tested by the exporter
param: int $expectedcount the expected count of records to be exported

get_records_count_provider()   X-Ref
Data provider method for self::test_get_records_count.

return: array data for testing

test_add_file_from_string(array $files, bool $success)   X-Ref
Tests adding of files to the exporter to be included in the exported zip archive.

param: array $files array of filename and filecontent to be tested for exporting
param: bool $success if the exporting of files should be successful

add_file_from_string_provider()   X-Ref
Data provider method for self::test_add_file_from_string.

return: array data for testing

test_create_unique_filename(string $inputfilename, string $resultfilename)   X-Ref
Tests if unique filenames are being created correctly.

param: string $inputfilename the name of the file which should be converted into a unique filename
param: string $resultfilename the maybe changed $inputfilename, so that it is unique in the exporter

create_unique_filename_provider()   X-Ref
Data provider method for self::test_create_unique_filename.

return: array data for testing