Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75182

Remove language assumptions from LTI Advantage unit tests

XMLWordPrintable

    • 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.

            jaked Jake Dallimore
            jaked Jake Dallimore
            Michael Hawkins Michael Hawkins
            Simey Lameze Simey Lameze
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 25 minutes
                1h 25m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.