-
Bug
-
Resolution: Fixed
-
Minor
-
4.3.3
-
1
-
HQ 2024 Sprint I1.3 Moppies
We're seeing a random PHPUnit failure with PHP 8.1
Refer to this build: https://ci.moodle.org/job/DEV.02%20-%20Developer-requested%20PHPUnit/14953/
enrollib_test::test_enrol_user_sees_own_courses
|
coding_exception: Coding error detected, it must be fixed by a programmer: The theme has already been set up for this page ready for output. Therefore, you can no longer change the theme, or anything that might affect what the current theme is, for example, the course. (Stack trace when the theme was set up: <ul style="text-align: left" data-rel="backtrace"><li>line 761 of /lib/pagelib.php: call to moodle_page->initialise_theme_and_output()</li><li>line 972 of /lib/pagelib.php: call to moodle_page->magic_get_theme()</li><li>line 82 of /lib/classes/output/icon_system.php: call to moodle_page->__get()</li><li>line 34 of /lib/tests/output/icon_system_fontawesome_test.php: call to core\output\icon_system::instance()</li><li>line ? of unknownfile: call to core\output\icon_system_fontawesome_test->get_icon_name_map()</li><li>line 421 of /vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php: call to ReflectionMethod->invoke()</li><li>line 278 of /vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php: call to PHPUnit\Util\Annotation\DocBlock->getDataFromDataProviderAnnotation()</li><li>line 329 of /vendor/phpunit/phpunit/src/Util/Test.php: call to PHPUnit\Util\Annotation\DocBlock->getProvidedData()</li><li>line 74 of /vendor/phpunit/phpunit/src/Framework/TestBuilder.php: call to PHPUnit\Util\Test::getProvidedData()</li><li>line 891 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestBuilder->build()</li><li>line 232 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->addTestMethod()</li><li>line 362 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->__construct()</li><li>line 512 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->addTestSuite()</li><li>line 537 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->addTestFile()</li><li>line 67 of /vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php: call to PHPUnit\Framework\TestSuite->addTestFiles()</li><li>line 393 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestSuiteMapper->map()</li><li>line 114 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->handleArguments()</li><li>line 99 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()</li><li>line 107 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()</li><li>line 122 of /vendor/bin/phpunit: call to include()</li></ul>)/var/www/html/lib/pagelib.php:2225 |
/var/www/html/lib/pagelib.php:1155 |
/var/www/html/lib/moodlelib.php:2611 |
/var/www/html/enrol/tests/enrollib_test.php:537 |
/var/www/html/lib/phpunit/classes/advanced_testcase.php:69 |
|
Eloy helped to do a mega-bisect for this
$ git bisect run phpunit_bisect --filter test_enrol_user_sees_own_courses...
|
...
|
52811000310e7c663fcb75d61b90756f9ded6c7a is the first bad commit
|
commit 52811000310e7c663fcb75d61b90756f9ded6c7a
|
Author: Andrew Nicols <andrew@nicols.co.uk> |
Date: Fri Nov 15 14:44:04 2019 +0800 MDL-67271 core: Add test to find missing SVG icons |
|
Ensure that all system icons now come with an accompanying SVG file.
|
Any missing SVG files have been addressed, and to maintain this consistency, |
a PHPUnit test has been implemented to validate the inclusion of SVG files
|
for any new icons. lib/classes/output/icon_system.php | 4 +- |
lib/tests/output/icon_system_fontawesome_test.php | 66 +++++++++++++++++++++++ |
lib/upgrade.txt | 2 + |
3 files changed, 70 insertions(+), 2 deletions(-) |
create mode 100644 lib/tests/output/icon_system_fontawesome_test.php |
bisect found first bad commit
|
|