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

Defines 1 class

entries_importer_test:: (4 methods):
  setUp()
  get_test_data()
  test_get_file_content_from_zip()
  get_file_content_from_zip_provider()


Class: entries_importer_test  - X-Ref

Unit tests for entries_importer and csv_entries_importer class.

Also {@see entries_import_test} class which provides module tests for importing entries.

setUp()   X-Ref
Set up function.


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

test_get_file_content_from_zip(array $files, mixed $datafilecontent)   X-Ref
Test importing files from zip archive.

param: array $files array of filenames and filecontents to test
param: mixed $datafilecontent the expected result returned by the method which is being tested here

get_file_content_from_zip_provider()   X-Ref
Data provider method for self::test_get_file_content_from_zip.

return: array data for testing