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

core\output\icon_system static cache isn't cleared between unit tests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.3.3
    • 3.3.2
    • Unit tests

      core\output\icon_system stores the instance in private static $instance the first time the instance() method is called, and has no way of clearing it.  This means that if you are testing output for themes that use different icons systems, the second one will use the first icon system.

      Steps to reproduce:

      1. Download attached icon_test.php and place it /lib/phpunit/tests
      2. Re-ininitialise PHPUnit
      3. Run test_two(), verify that it passes.
      4. Run the whole file, test_one() will pass but test_two() will fail.

            marxjohnson Mark Johnson
            marxjohnson Mark Johnson
            Sam Marshall Sam Marshall
            David Monllaó David Monllaó
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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