-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.1
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-75182-master -
-
1
-
Team Hedgehog 4.1 sprint 0.1
From a comment on MDL-69542:
enrol/lti/tests/local/ltiadvantage/entity/user_test.php
Fails if French is installed when the unit test are executed. Shouldn't the language be a non-existence if that is what result you are expecting?
1) enrol_lti\local\ltiadvantage\entity\user_test::test_create with data set "Invalid create, lang with bad value (fr not installed)" (array(22, 2, 33, 'user-id-123', 'fr', '99'), array(false, 'coding_exception', 'Invalid lang 'fr' provided.'))
Failed asserting that exception of type "coding_exception" is thrown.
2) enrol_lti\local\ltiadvantage\entity\user_test::test_create_from_resource_link with data set "Invalid creation, only required args provided, invalid lang (fr not installed)" (array(11, 22, 2, 33, 'user-id-123', 'fr', 'UTC'), array(false, 'coding_exception', 'Invalid lang 'fr' provided.'))
Failed asserting that exception of type "coding_exception" is thrown.
There are also several other tests which directly use 'en'.
We should just check a language that can't exist, like 'vvvvv' or something instead. Also need to fix the 'en' test cases too, to make sure that lang is installed and available. This might require just changing 'en' to one of the installed languages.