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

Clean $SESSION->notifications when resetting after a unit test

XMLWordPrintable

    • MOODLE_311_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-72085-master
    • Hide
      1. Install https://github.com/dmitriim/moodle-local_helper to local/helper

        git clone git@github.com:dmitriim/moodle-local_helper.git local/helper

      2. Run following tests and make sure they passed

        vendor/bin/phpunit --order-by=reverse  --testsuite  local_helper_testsuite,tool_dataprivacy_testsuite

      Show
      Install https://github.com/dmitriim/moodle-local_helper  to local/helper git clone git@github.com:dmitriim/moodle-local_helper.git local/helper Run following tests and make sure they passed vendor/bin/phpunit --order-by=reverse --testsuite local_helper_testsuite,tool_dataprivacy_testsuite

      Data privacy tool doesn't clean up notifications from the SESSION object after some tests.

       

       

      bin/moodle-docker-compose exec webserver vendor/bin/phpunit --testsuite local_helper_testsuite,tool_dataprivacy_testsuite
      Moodle 4.0dev (Build: 20210701), 3610f1ee3b3da37140a7641af602bb5e3c8ba1bb
      Php: 7.4.19, pgsql: 11.11 (Debian 11.11-1.pgdg90+1), OS: Linux 5.8.0-59-generic x86_64
      PHPUnit 9.5.4 by Sebastian Bergmann and contributors.
      ............................................................... 63 / 306 ( 20%)
      ............................................................... 126 / 306 ( 41%)
      ............................................................... 189 / 306 ( 61%)
      ............................................................... 252 / 306 ( 82%)
      .....................................................F 306 / 306 (100%)
      Time: 00:42.913, Memory: 113.00 MB
      There was 1 failure:
      1) local_helper\tests\dummy_test::test_session_termination
      Failed asserting that an array is empty.
      /var/www/html/local/helper/tests/dummy_test.php:48
      /var/www/html/lib/phpunit/classes/advanced_testcase.php:80
      FAILURES!
      Tests: 306, Assertions: 1210, Failures: 1.
      

       

       

            dmitriim Dmitrii Metelkin
            dmitriim Dmitrii Metelkin
            Misha Golenkov Misha Golenkov
            Victor Déniz Falcón Victor Déniz Falcón
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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