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

Check non _test.php files containing PHPUnit assertions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.10
    • Unit tests
    • None
    • MOODLE_310_STABLE

      While working on MDL-67673 it was detected that there are some files in core, not being ended with "_test.php" having PHPUnit assertions.

      PHPUnit's finder doesn't return them as candidates, it only looks for "_test.php" ended files, so it's not clear what's happening there. Are they run ever?

      This issue is about to verify what happens with those files, maybe also create some routine to find them in the future and, if needed, fix the existing cases.

      The list, as of the creation of this issue is:

      $ ag 'this\->assert' -l | grep -v '_test.php'
      rating/classes/phpunit/privacy_helper.php
      privacy/tests/userlist_collection.php
      cache/tests/fixtures/stores.php
      question/tests/privacy_helper.php
      question/engine/upgrade/tests/helper.php
      question/engine/tests/helpers.php
      lib/classes/update/validator.php
      lib/google/src/Google/Auth/AssertionCredentials.php
      lib/google/src/Google/Auth/OAuth2.php
      lib/tests/event_course_module_viewed.php
      lib/tests/event_course_module_instance_list_viewed.php
      lib/tests/core_media_player_native.php
      lib/phpunit/classes/restore_date_testcase.php
      lib/phpunit/classes/database_driver_testcase.php
      lib/phpunit/classes/advanced_testcase.php
      lib/phpunit/tests/phpunit_dataset.test.php
      lib/scssphp/Compiler.php
      lib/htmlpurifier/HTMLPurifier/ConfigSchema/ValidatorAtom.php
      lib/upgrade.txt
      tag/classes/tests/privacy_helper.php
      mod/forum/tests/cron_trait.php
      analytics/tests/community_of_inquiry_activities_completed_by.php
      

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

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