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

core_string_manager_standard_testcase::test_validate_deprecated_strings_files has no assertions

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.6, 3.1.2, 3.2
    • Fix Version/s: 3.0.7, 3.1.3
    • Component/s: Unit tests
    • Labels:
    • Testing Instructions:
      Hide
      1. Run test:

        ./vendor/bin/phpunit --filter test_validate_deprecated_strings_files
        

      2. Edit lang/en/deprecate.txt and replace its contents:

        mybackpack ,core_badges
        mybadges, core_badges
        myfiles , core
        myfilesmanage,core,
         mypreferences,core_grades
        ,myprofile,core
        viewallmyentries,core_blog,Placeholder
        cannotdeleteposts,core_notes
        addedotag,core_tags
        newname,core_tag 
        

        (Note the final entry has trailing whitespace)

      3. Run the test again
      4. Confirm 8 failures - the leading and trailing whitespace do not cause failures
      Show
      Run test: ./vendor/bin/phpunit --filter test_validate_deprecated_strings_files Edit lang/en/deprecate.txt and replace its contents: mybackpack ,core_badges mybadges, core_badges myfiles , core myfilesmanage,core, mypreferences,core_grades ,myprofile,core viewallmyentries,core_blog,Placeholder cannotdeleteposts,core_notes addedotag,core_tags newname,core_tag (Note the final entry has trailing whitespace) Run the test again Confirm 8 failures - the leading and trailing whitespace do not cause failures
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-56316-master

      Description

      Just came across a test with no assertions (only failures).

      core_string_manager_standard_testcase::test_validate_deprecated_strings_files
      This means that the assertion count is incorrect.

      These should be written as assertions rather than fails.

        Attachments

          Activity

            People

            • Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Nov/16