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

core_string_manager_standard_testcase::test_validate_deprecated_strings_files has no assertions

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.7, 3.1.3
    • 3.0.6, 3.1.2, 3.2
    • Unit tests
    • MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-56316-master
    • 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

      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.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Rajesh Taneja Rajesh Taneja
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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