-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.2
-
MOODLE_33_STABLE
-
MOODLE_33_STABLE
-
MDL-60600_master -
- Download attached icon_test.php and place it /lib/phpunit/tests
- Re-ininitialise PHPUnit
- Run the whole file, verify that it passes (before fix, test_two() will fail).
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:
- Download attached icon_test.php and place it /lib/phpunit/tests
- Re-ininitialise PHPUnit
- Run test_two(), verify that it passes.
- Run the whole file, test_one() will pass but test_two() will fail.