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]

This file contains unit test related to xAPI library.

Copyright: 2020 Ferran Recio
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 253 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: item_agent_test  - X-Ref

Contains test cases for testing statement agent class.

test_create()   X-Ref
Test item creation.


test_create_from_user()   X-Ref
Test item creation from Record.


test_invalid_data(string $objecttype, bool $validhome, bool $validid)   X-Ref
Test for invalid structures.

param: string $objecttype object type attribute
param: bool $validhome if valid homepage is user
param: bool $validid if valid group id is used

invalid_data_provider()   X-Ref
Data provider for the test_invalid_data tests.

return: array

test_unspupported_create(bool $usembox, bool $useaccount, bool $usesha1, bool $useopenid)   X-Ref
Test non supported account identifier xAPI formats.

param: bool $usembox
param: bool $useaccount
param: bool $usesha1
param: bool $useopenid

unspupported_create_provider()   X-Ref
Data provider for the unsupported identifiers tests.

return: array

test_missing_object_type()   X-Ref
Test for missing object type.


test_inexistent_agent()   X-Ref
Test for invalid user id.


test_inexistent_agent_id()   X-Ref
Test for invalid agent record.