Closed katerynadegtyariova closed 2 years ago
The current implementation of cltr::get_enabled_plugins() causes unit test failure in Moodle.
Run the following command to repeat: vendor/bin/phpunit "core_plugin_manager_testcase" lib/tests/plugin_manager_test.php
vendor/bin/phpunit "core_plugin_manager_testcase" lib/tests/plugin_manager_test.php
The error output is very long, so it will be truncated here:
root@a98befdc0147:/var/www/moodletest# vendor/bin/phpunit "core_plugin_manager_testcase" lib/tests/plugin_manager_test.php Moodle 3.9.14+ (Build: 20220701), 1b0ca9c4ded8c25141a6a62b728323800ca036c8 Php: 7.4.29, pgsql: 9.6.24, OS: Linux 5.15.0-37-generic x86_64 PHPUnit 7.5.20 by Sebastian Bergmann and contributors. ......F.................................. 41 / 41 (100%) Time: 8.69 seconds, Memory: 93.00 MB There was 1 failure: 1) core_plugin_manager_testcase::test_get_enabled_plugins Failed asserting that tool_cloudmetrics\plugininfo\cltr Object &000000000eb286ce00000000759a04e4 ( 'type' => 'cltr' 'typerootdir' => '/var/www/moodletest/admin/tool/cloudmetrics/collector' 'name' => 'database' 'displayname' => 'Cloudmetrics database collector' .... 'availableupdates' => null ) is identical to 'database'. /var/www/moodletest/lib/tests/plugin_manager_test.php:108 /var/www/moodletest/lib/phpunit/classes/advanced_testcase.php:80 phpvfscomposer:///var/www/moodletest/vendor/phpunit/phpunit/phpunit:60 To re-run: vendor/bin/phpunit "core_plugin_manager_testcase" lib/tests/plugin_manager_test.php FAILURES! Tests: 41, Assertions: 6504, Failures: 1.
The issue is fixed by the following Pull Request:
https://github.com/catalyst/moodle-tool_cloudmetrics/pull/109
The current implementation of cltr::get_enabled_plugins() causes unit test failure in Moodle.
Run the following command to repeat:
vendor/bin/phpunit "core_plugin_manager_testcase" lib/tests/plugin_manager_test.php
The error output is very long, so it will be truncated here: