moodleou / moodle-report_customsql

A Moodle report plugin that lets you easily create simple reports that can be expressed as a single SQL query
46 stars 100 forks source link

Moodle 4.2 unit tests: Class "external_api" not found #140

Open golenkovm opened 1 year ago

golenkovm commented 1 year ago

Please find details below:

Moodle 4.2.2+ (Build: 20230920)
Php: 8.1.2.1.2.14, pgsql: 14.9 (Debian 14.9-1.pgdg120+1), OS: Linux 6.2.0-1009-aws x86_64
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

...

11) report_customsql\external\external_get_users_test::test_get_users_site_config
Error: Class "external_api" not found

/var/www/site/report/customsql/classes/external/get_users.php:31
/var/www/site/lib/classes/component.php:144
/var/www/site/report/customsql/tests/external/external_get_users_test.php:73
/var/www/site/lib/phpunit/classes/advanced_testcase.php:94
tholudwig commented 9 months ago

Hi,

an old version of the plugin was mistakenly checked out in our repo. After a rebase, all unit tests run without errors. Perhaps an update of the plugin will fix the error for you, as it did for us.

timhunt commented 9 months ago

Thanks.