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

Defines 1 class

iri_test:: (6 methods):
  setupBeforeClass()
  test_generate()
  test_extract()
  iri_samples_provider()
  test_check()
  iri_check_provider()


Class: iri_test  - X-Ref

Contains test cases for testing xAPI iri class.

setupBeforeClass()   X-Ref
Setup to ensure that fixtures are loaded.


test_generate(string $value, string $expected, string $type = null)   X-Ref
Test IRI generation.

param: string $value Value to generate IRI
param: string $expected Expected result
param: string $type = null If some special type is provided

test_extract(string $expected, string $value, string $type = null)   X-Ref
Test IRI extraction.

param: string $expected Expected result
param: string $value Value to generate IRI
param: string $type = null If some special type is provided

iri_samples_provider()   X-Ref
Data provider for the test_generate and test_extract tests.

return: array

test_check(string $value, bool $expected)   X-Ref
Test IRI generation.

param: string $value Value to generate IRI
param: bool $expected Expected result

iri_check_provider()   X-Ref
Data provider for the test_check.

return: array