catalyst / moodle-auth_outage

Planned, graduated user and admin friendly moodle outages
https://moodle.org/plugins/auth_outage
17 stars 32 forks source link

Unit test test_svg_fallback failing in Moodle 4.3 #328

Closed ScottVerbeek closed 1 month ago

ScottVerbeek commented 6 months ago

The unit test has originated from the tracker https://tracker.moodle.org/browse/MDL-67271. In the dev update (https://moodledev.io/docs/4.3/devupdate#icons) it mentions this.

Third-party plugins are strongly encouraged to follow suit, adding missing SVG files too, to avoid PHPUnit test failures.

The SVG icons in Moodle LMS were sourced from https://fontawesome.com/search?m=free&o=r, which offers free icons under the Creative Commons Attribution 4.0 International license, consistent with the Moodle icon set.

Resulting in this issue. The font awesome mapping in https://github.com/catalyst/moodle-auth_outage/blob/MOODLE_39_STABLE/lib.php#L68-L77 requires the icon for auth_outageevent to be added to the plugin. However I don't believe this is still in use.

PHPUnit test run of the test_svg_fallback on Moodle 4.3.2 (Build: 20231222) ``` root@c3e2c38a9c70:/var/www/vanilla-403# vendor/bin/phpunit --filter test_svg_fallback Moodle 4.3.2 (Build: 20231222), 6a6043c47b80ea6f64f69d8a41487ded3444a970 Php: 8.1.24, pgsql: 14.0 (Debian 14.0-1.pgdg110+1), OS: Linux 6.4.12-060412-generic x86_64 PHPUnit 9.5.28 by Sebastian Bergmann and contributors. ............................................................... 63 / 507 ( 12%) ............................................................... 126 / 507 ( 24%) ............................................................... 189 / 507 ( 37%) ............................................................... 252 / 507 ( 49%) ............................................................... 315 / 507 ( 62%) ............................................................... 378 / 507 ( 74%) ............................................................... 441 / 507 ( 86%) .............F................................................. 504 / 507 ( 99%) ... 507 / 507 (100%) Time: 00:10.710, Memory: 344.00 MB There was 1 failure: 1) core\output\icon_system_fontawesome_test::test_svg_fallback with data set #454 ('core:i/auth_outageevent', '/var/www/vanilla-403', 'i/auth_outageevent') No SVG equivalent found for 'core:i/auth_outageevent' Failed asserting that false is true. /var/www/vanilla-403/lib/tests/output/icon_system_fontawesome_test.php:64 /var/www/vanilla-403/lib/phpunit/classes/advanced_testcase.php:81 FAILURES! Tests: 507, Assertions: 507, Failures: 1. ```
danmarsden commented 1 month ago

fixed in #329