Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

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_testcase:: (6 methods):
  setupBeforeClass()
  test_generate()
  test_extract()
  iri_samples_provider()
  test_check()
  iri_check_provider()


Class: iri_testcase  - 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