Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test failing - Class assignsubmission_onenote\privacy\provider_test cannot extend final class mod_assign\privacy\provider_test #2735

Open
MichaelReyesCatcan opened this issue Dec 19, 2024 · 1 comment · May be fixed by #2737 or #2736
Assignees
Milestone

Comments

@MichaelReyesCatcan
Copy link

The issue is happening when running a unit test for assignsubmission_onenote plugin.

Environment Details

  • PHP version 8.1
  • Moodle 4.1

Branch

  • MOODLE_401_STABLE

How to recreate?

  1. Get the latest code (MOODLE_401_STABLE) installed.
  2. Run a unit test
    vendor/bin/phpunit mod/assign/submission/onenote/tests/privacy/provider_test.php

Actual Output:

root@a36f74046b63:/var/www/cambrian-college-m41# vendor/bin/phpunit mod/assign/submission/onenote/tests/privacy/provider_test.php 
Moodle 4.1.15+ (Build: 20241213), dc6a37ccd88152e58abf61e5b379cddab03f7f36
Php: 8.1.30, pgsql: 16.0 (Debian 16.0-1.pgdg120+1), OS: Linux 6.8.0-47-generic x86_64

Fatal error: Class assignsubmission_onenote\privacy\provider_test cannot extend final class mod_assign\privacy\provider_test in /var/www/cambrian-college-m41/mod/assign/submission/onenote/tests/privacy/provider_test.php on line 45

Expected output:
No errors.

root@a36f74046b63:/var/www/cambrian-college-m41# vendor/bin/phpunit mod/assign/submission/onenote/tests/privacy/provider_test.php 
Moodle 4.1.15+ (Build: 20241213), dc6a37ccd88152e58abf61e5b379cddab03f7f36
Php: 8.1.30, pgsql: 16.0 (Debian 16.0-1.pgdg120+1), OS: Linux 6.8.0-47-generic x86_64
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

.....                                                               5 / 5 (100%)

Time: 00:01.981, Memory: 92.50 MB

OK (5 tests, 23 assertions)
MichaelReyesCatcan added a commit to catalyst-ca/o365-moodle that referenced this issue Dec 19, 2024
MichaelReyesCatcan added a commit to catalyst-ca/o365-moodle that referenced this issue Dec 19, 2024
MichaelReyesCatcan added a commit to catalyst-ca/o365-moodle that referenced this issue Dec 19, 2024
MichaelReyesCatcan added a commit to catalyst-ca/o365-moodle that referenced this issue Dec 19, 2024
@weilai-irl weilai-irl self-assigned this Dec 20, 2024
@weilai-irl weilai-irl added this to the 2025-01 milestone Dec 20, 2024
@weilai-irl
Copy link
Collaborator

Hi @MichaelReyesCatcan

Thank you for reporting the issue. I acknowledge the issue.

This is caused by changes in Moodle core for MDL-81520, which has been added to the stable branches of 40X, but not released. mod_assign\privacy\provider_test was changed to final class in this change.

I'll review the changes and include it in the next release.

Regards,
Lai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants