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

Failing unit tests in Moodle 4.3 #712

Closed
saidisalem opened this issue Jun 4, 2024 · 0 comments
Closed

Failing unit tests in Moodle 4.3 #712

saidisalem opened this issue Jun 4, 2024 · 0 comments

Comments

@saidisalem
Copy link

saidisalem commented Jun 4, 2024

plagiarism_turnitin is failing to pass unit testing with Moodle 4.3. There are some changes to quiz classes in Moodle core, please see the trace below:

plagiarism_turnitin_quiz_testcase::test_update_mark
Unexpected debugging() call detected.
Debugging: Class 'quiz' has been renamed for the autoloader and is now deprecated. Please use 'mod_quiz\quiz_settings' instead.
* line 153 of /lib/classes/component.php: call to debugging()
* line 58 of /plagiarism/turnitin/tests/modules/turnitin_quiz_test.php: call to core_component::classloader()
* line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to plagiarism_turnitin_quiz_testcase->test_update_mark()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
* line 81 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
* line 728 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
* line 904 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 653 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
* line 144 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->run()
* line 97 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
* line 98 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 122 of /vendor/bin/phpunit: call to include()
Debugging: Class 'quiz_attempt' has been renamed for the autoloader and is now deprecated. Please use 'mod_quiz\quiz_attempt' instead.
* line 153 of /lib/classes/component.php: call to debugging()
* line 72 of /plagiarism/turnitin/tests/modules/turnitin_quiz_test.php: call to core_component::classloader()
* line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to plagiarism_turnitin_quiz_testcase->test_update_mark()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
* line 81 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
* line 728 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
* line 904 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 653 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
* line 144 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->run()
* line 97 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
* line 98 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 122 of /vendor/bin/phpunit: call to include()
Debugging: quiz_save_best_grade is deprecated. Please use a standard grade_calculator::recompute_final_grade instead.
* line 288 of /mod/quiz/deprecatedlib.php: call to debugging()
* line 104 of /plagiarism/turnitin/classes/modules/turnitin_quiz.class.php: call to quiz_save_best_grade()
* line 86 of /plagiarism/turnitin/tests/modules/turnitin_quiz_test.php: call to turnitin_quiz->update_mark()
* line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to plagiarism_turnitin_quiz_testcase->test_update_mark()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
* line 81 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
* line 728 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
* line 904 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 653 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
* line 144 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->run()
* line 97 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
* line 98 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 122 of /vendor/bin/phpunit: call to include()


/var/www/html/lib/phpunit/classes/advanced_testcase.php:89

ERRORS!
Tests: 28, Assertions: 89, Errors: 1.

There is a patch already implemented for 4.2, please see : #683

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

No branches or pull requests

2 participants