• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.10.9, 3.11.5
    • 3.10.8, 3.11.4, 4.0
    • Payments, Unit tests
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • Hide

      A) General

      1. Verify that complete PHPUnit runs are passing (GHA, ToBiC...) for all branches.

      B) Testing instructions for MOODLE_311_STABLE and master

      1. Install local_codechecker in the site.
      2. Init phpunit: php admin/tool/phpunit/cli/init.php
      3. Run this (see the important note below about the HEAD alternatives and commits):

        git show --pretty="" --name-only HEAD~2  | \
            xargs local/codechecker/phpcs/bin/phpcs --standard=moodle  --extensions=php  \
            --sniffs=moodle.PHPUnit.TestCaseNames -p && echo "Yay!"
        

      4. Verify that you get 138 (for master) dots in the output, without any error and with "Yay!" printed at the end. For 311_STABLE instead of 138 you should get 111 dots.
      5. Run this (see the important note below about the HEAD alternatives and commits):

        git show --pretty="" --name-only HEAD~2 | \
            xargs -n 1 -I {} bash -c "echo {}; vendor/bin/phpunit {} > /dev/null || echo ERRORs!"
        

      6. Verify that you don't get any "ERRORs!" output, that means that all the tests modified can be run individually.

      Important Note: the HEAD~2 in the above commands assumes that the branches have been integrated without any merge commit. You may need to replace them by the real commits if the issue has been integrated with merge commit. Here there are the commit details:

      • 311_STABLE:
        • HEAD~2 = 2c30590
      • master:
        • HEAD~2 = deb0e76

      C) Testing instructions for MOODLE_310_STABLE

      1. Init phpunit: php admin/tool/phpunit/cli/init.php
      2. Run: vendor/bin/phpunit payment/tests/helper_test.php
      3. Verify that it finishes Ok (13 tests).
      4. Run: vendor/bin/phpunit payment/tests/generator_test.php
      5. Verify that it finishes Ok (2 tests).
      6. Run: vendor/bin/phpunit --testsuite core_payment_testsuite
      7. Verify that it finishes Ok (15 tests).

      Note: If you get some of these tests marked as skipped, surely it's because your system is using old ICU libraries. Please, check that you're using ICU 62 or newer.

      Show
      A) General Verify that complete PHPUnit runs are passing (GHA, ToBiC...) for all branches. B) Testing instructions for MOODLE_311_STABLE and master Install local_codechecker in the site. Init phpunit: php admin/tool/phpunit/cli/init.php Run this (see the important note below about the HEAD alternatives and commits): git show --pretty="" --name-only HEAD~2 | \ xargs local/codechecker/phpcs/bin/phpcs --standard=moodle --extensions=php \ --sniffs=moodle.PHPUnit.TestCaseNames -p && echo "Yay!" Verify that you get 138 (for master) dots in the output, without any error and with "Yay!" printed at the end. For 311_STABLE instead of 138 you should get 111 dots. Run this (see the important note below about the HEAD alternatives and commits): git show --pretty="" --name-only HEAD~2 | \ xargs -n 1 -I {} bash -c "echo {}; vendor/bin/phpunit {} > /dev/null || echo ERRORs!" Verify that you don't get any "ERRORs!" output, that means that all the tests modified can be run individually. Important Note : the HEAD~2 in the above commands assumes that the branches have been integrated without any merge commit. You may need to replace them by the real commits if the issue has been integrated with merge commit. Here there are the commit details: 311_STABLE: HEAD~2 = 2c30590 master: HEAD~2 = deb0e76 C) Testing instructions for MOODLE_310_STABLE Init phpunit: php admin/tool/phpunit/cli/init.php Run: vendor/bin/phpunit payment/tests/helper_test.php Verify that it finishes Ok (13 tests). Run: vendor/bin/phpunit payment/tests/generator_test.php Verify that it finishes Ok (2 tests). Run: vendor/bin/phpunit --testsuite core_payment_testsuite Verify that it finishes Ok (15 tests). Note : If you get some of these tests marked as skipped, surely it's because your system is using old ICU libraries. Please, check that you're using ICU 62 or newer.

      This corresponds with point A of MDL-71049.

      It's about to fix the tescase class names for all the classes that are already namespaced.

      100% safe, no name conflicts can happen.

      Notes for reviewers:

      • The test name changes are fixed in 311 and master only (because they are only needed in versions using phpunit 9 and up).
      • Apart from the test name changes, there is 1 extra commit in all branches to fix a missing testsuite (payment) that was causing those test to not being execute ever. That's the reason there is a 310 branch, where payments were introduced, only having that commit (not the test name changes ones).
      • CiBoT warnings are ok. Here we are only fixing namespaced test names. Those warnings correspond to non-namespaced tests that will be fixed in another issue, when their respective components are reviewed.
      • Some tests are being marked as skipped when old ICU libraries are found in the system.

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Ilya Tregubov Ilya Tregubov
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 21 minutes
                2d 21m

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