-
Bug
-
Resolution: Fixed
-
Minor
-
3.8.5, 3.9.2, 3.10, 4.0
-
MOODLE_310_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_38_STABLE, MOODLE_39_STABLE
-
-
Moppies Kanban
In test_loadAddons() this sentence $this->framework->loadAddons() is used to load the addons libraries and get the info related. The results are not sorted, so in the test when this assert is done ["$this->assertEquals('Library', $addons[0]['machineName']);"|https://github.com/moodle/moodle/blob/master/h5p/tests/framework_test.php#L476] we don't really know if 'Library' will be the first element of the array. So, sometimes we get some error in the PHPUnit test because it's expected one value and it gets another.
Example of the error: Failed asserting that two strings are equal.
1) core_h5p\framework_testcase::test_loadAddons |
Failed asserting that two strings are equal.
|
--- Expected
|
+++ Actual1
|
-'Library' |
+'Library1' |
/moodle/h5p/tests/framework_test.php:
|
/moodle/lib/phpunit/classes/advanced_testcase.php:
|
To re-run: vendor/bin/phpunit --verbose "core_h5p\framework_testcase" h5p/tests/framework_test.php |
- Discovered while testing
-
MDL-69520 Add Example and Tutorial links to the H5P editor
- Closed