-
Bug
-
Resolution: Fixed
-
Minor
-
4.3.2, 4.4
This addresses a unit test failure related to custom icons in Moodle. The current "test_get_file_icons" unit test, on tool_filetypes, causes issues on sites with custom icons due to a mismatch in expected counts. Developers can add custom icons to the path `/pix/f/`, for example, `/pix/f/mycustomicon.svg`.
The proposed change adjusts the validation approach. The test now checks for the required icons, without needing to specify a count. Allowing developers to add custom icons to the folder without needing to alter any unit test.
Steps to reproduce
- Add a custom icon to `/pix/f/`. For example make a copy of unknown.svg in the `/pix/f` folder and rename to mycustomicon.svg.
- Initialise the unit tests. Execute `php admin/tool/phpunit/cli/init.php`
- Execute the testsuite for tool_filetypes. `Run vendor/bin/phpunit --testsuite tool_filetypes_testsuite`
- Observe the failing unit test.
- is a regression caused by
-
MDL-78884 Remove sized files for MIME icons and update them with new SVG files
-
- Closed
-