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: 260 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

entries_export_test:: (4 methods):
  get_test_data()
  test_export_csv()
  test_export_ods()
  get_ods_rows_content()


Class: entries_export_test  - X-Ref

Unit tests for exporting entries.

get_test_data()   X-Ref
Get the test data.

In this instance we are setting up database records to be used in the unit tests.

return: array of test instances

test_export_csv()   X-Ref
Tests the exporting of the content of a mod_data instance by using the csv_entries_exporter.

It also includes more general testing of the functionality of the entries_exporter the csv_entries_exporter
is inheriting from.


test_export_ods()   X-Ref
Tests specific ODS exporting functionality.


get_ods_rows_content(string $content)   X-Ref
Helper function to extract the text data as row arrays from an ODS document.

param: string $content the file content
return: array two-dimensional row/column array with the text content of the first spreadsheet