Skip to content

Unittest failing missing SVG file #1113

@micoreyes

Description

@micoreyes

Describe the bug
Related to tracker https://moodle.atlassian.net/browse/MDL-81386. Unit test failure is being introduced in Moodle 4.3 using theme_booost_union branches (MOODLE_403_STABLE and onwards).

To Reproduce
Steps to reproduce the behavior:

  1. Initiate a vanila Moodle instance in this case 4.5
  2. Add plugin theme_boost_union (Branch: MOODLE_405_STABLE)
  3. Initialize unittest
  4. Run vendor/bin/phpunit lib/tests/output/icon_system_fontawesome_test.php --filter test_svg_fallback

Actual behaviour

root@1bb11dad0417:/var/www/moodle# vendor/bin/phpunit lib/tests/output/icon_system_fontawesome_test.php --filter test_svg_fallback
Moodle 4.5.8+ (Build: 20251219), 2cd8cdb7bc5df825b51ff603182fc799477e19f5
Php: 8.3.28, mysqli: 8.0.41, OS: Linux 6.8.0-47-generic x86_64
PHPUnit 9.6.18 by Sebastian Bergmann and contributors.

F                                                                   1 / 1 (100%)

Time: 00:00.246, Memory: 80.50 MB

There was 1 failure:

1) core\output\icon_system_fontawesome_test::test_svg_fallback
No SVG equivalent found for 'theme_boost_union:info'
Failed asserting that false is true.

/var/www/moodle/lib/tests/output/icon_system_fontawesome_test.php:55
/var/www/moodle/lib/phpunit/classes/advanced_testcase.php:76

FAILURES!
Tests: 1, Assertions: 519, Failures: 1.

Expected behavior

root@1bb11dad0417:/var/www/moodle# vendor/bin/phpunit lib/tests/output/icon_system_fontawesome_test.php --filter test_svg_fallback
Moodle 4.5.8+ (Build: 20251219), 2cd8cdb7bc5df825b51ff603182fc799477e19f5
Php: 8.3.28, mysqli: 8.0.41, OS: Linux 6.8.0-47-generic x86_64
PHPUnit 9.6.18 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 00:00.474, Memory: 80.50 MB

OK (1 test, 522 assertions)

Please complete the following information:

  • Moodle Version: 4.5.8
  • Boost Union Version: 2024100759

Additional context
This issue is happening on branches 4.3, 4.4, 4.5. 5.0, 5.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething which isn't workingnewSomething which has been reported but has not yet beeen triaged by the team

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions