Contains helper functions for xAPI PHPUnit Tests.
More...
|
| get_last_log_entry () |
| Return the last log entry from standardlog.
|
|
| init_log () |
| Constructor for a xAPI test helper.
|
|
|
static | create_state (array $info=[], bool $createindatabase=false) |
| Return a valid state object with the params passed.
|
|
Contains helper functions for xAPI PHPUnit Tests.
- Since
- Moodle 3.9
- Copyright
- 2020 Ferran Recio
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ create_state()
static core_xapi\test_helper::create_state |
( |
array | $info = [], |
|
|
bool | $createindatabase = false ) |
|
static |
Return a valid state object with the params passed.
All tests are based on craft different types of states. This function is made to prevent redundant code on the test.
- Parameters
-
array | $info | array of overriden state data (default []). |
bool | $createindatabase | Whether the state object should be created in database too or not. |
- Return values
-
◆ get_last_log_entry()
core_xapi\test_helper::get_last_log_entry |
( |
| ) |
|
Return the last log entry from standardlog.
- Return values
-
core\event\base|null | The last log event or null if none found. |
The documentation for this class was generated from the following file:
- lib/xapi/tests/helper.php