Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 402 and 403]

(no description)

File Size: 557 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: state_store_test  - X-Ref

Contains test cases for testing xAPI state store methods.

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


test_state_store_delete(array $info, bool $expected)   X-Ref
Testing delete method.

param: array $info Array of overriden state data.
param: bool $expected Expected results.
return: void

test_state_store_get(array $info, bool $expected)   X-Ref
Testing get method.

param: array $info Array of overriden state data.
param: bool $expected Expected results.
return: void

states_provider()   X-Ref
Data provider for the test_state_store_delete and test_state_store_get tests.

return: array

test_state_store_put(array $info, string $expected)   X-Ref
Testing put method.

param: array $info Array of overriden state data.
param: string $expected Expected results.
return: void

put_states_provider()   X-Ref
Data provider for the test_state_store_put tests.

return: array

test_state_store_reset(array $info, int $expected)   X-Ref
Testing reset method.

param: array $info Array of overriden state data.
param: int $expected The states that will be reset.
return: void

test_state_store_wipe(array $info, int $expected)   X-Ref
Testing wipe method.

param: array $info Array of overriden state data.
param: int $expected The removed states.
return: void

reset_wipe_states_provider()   X-Ref
Data provider for the test_state_store_reset and test_state_store_wipe tests.

return: array

test_state_store_cleanup()   X-Ref
Testing cleanup method.

return: void

test_get_state_ids(string $component,?string $itemid,?string $registration,?bool $since,array $expected,)   X-Ref
Testing get_state_ids method.

param: string $component
param: string|null $itemid
param: string|null $registration
param: bool|null $since
param: array $expected the expected result
return: void

get_state_ids_provider()   X-Ref
Data provider for the test_get_state_ids.

return: array