Hi,
We're upgrading to Moodle 3.2 and have the latest version (v2016111502) of the gird format.
Environment is as follows:
DB: postgres 9.5.5
OS: Linux 16.04
PHP: 7.0
When running the Moodle unit tests, we get the following error:
$ vendor/bin/phpunit core_coursecatlib_testcase lib/tests/coursecatlib_test.php
Moodle 3.2+ (Build: 20161215), 6114bfc8ce34bffd6b60907b4b56ea8b55f1a4bf
Php: 7.0.8.0.0.16.04.3, pgsql: 9.5.5, OS: Linux 4.4.0-53-generic x86_64
PHPUnit 5.5.7 by Sebastian Bergmann and contributors.
.....E...... 12 / 12 (100%)
Time: 4.91 seconds, Memory: 82.00MB
There was 1 error:
- core_coursecatlib_testcase::test_delete
Unexpected debugging() call detected.
Debugging: Callback delete_course is deprecated. Function format_grid_delete_course should be converted to observer of event \core\event\course_content_deleted
- line 5011 of /lib/moodlelib.php: call to debugging()
- line 4818 of /lib/moodlelib.php: call to remove_course_contents()
- line 1692 of /lib/coursecatlib.php: call to delete_course()
- line 1687 of /lib/coursecatlib.php: call to coursecat->delete_full()
- line 329 of /lib/tests/coursecatlib_test.php: call to coursecat->delete_full()
- line ? of unknownfile: call to core_coursecatlib_testcase->test_delete()
- line 1085 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to ReflectionMethod->invokeArgs()
- line 936 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit_Framework_TestCase->runTest()
- line 80 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit_Framework_TestCase->runBare()
- line 701 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
- line 892 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit_Framework_TestResult->run()
- line 753 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit_Framework_TestCase->run()
- line 465 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit_Framework_TestSuite->run()
- line 185 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit_TextUI_TestRunner->doRun()
- line 115 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit_TextUI_Command->run()
- line 47 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit_TextUI_Command::main()
Debugging: Callback delete_course is deprecated. Function format_grid_delete_course should be converted to observer of event \core\event\course_content_deleted
- line 5011 of /lib/moodlelib.php: call to debugging()
- line 4818 of /lib/moodlelib.php: call to remove_course_contents()
- line 1692 of /lib/coursecatlib.php: call to delete_course()
- line 1687 of /lib/coursecatlib.php: call to coursecat->delete_full()
- line 329 of /lib/tests/coursecatlib_test.php: call to coursecat->delete_full()
- line ? of unknownfile: call to core_coursecatlib_testcase->test_delete()
- line 1085 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to ReflectionMethod->invokeArgs()
- line 936 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit_Framework_TestCase->runTest()
- line 80 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit_Framework_TestCase->runBare()
- line 701 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
- line 892 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit_Framework_TestResult->run()
- line 753 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit_Framework_TestCase->run()
- line 465 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit_Framework_TestSuite->run()
- line 185 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit_TextUI_TestRunner->doRun()
- line 115 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit_TextUI_Command->run()
- line 47 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit_TextUI_Command::main()
Debugging: Callback delete_course is deprecated. Function format_grid_delete_course should be converted to observer of event \core\event\course_content_deleted
- line 5011 of /lib/moodlelib.php: call to debugging()
- line 4818 of /lib/moodlelib.php: call to remove_course_contents()
- line 1692 of /lib/coursecatlib.php: call to delete_course()
- line 329 of /lib/tests/coursecatlib_test.php: call to coursecat->delete_full()
- line ? of unknownfile: call to core_coursecatlib_testcase->test_delete()
- line 1085 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to ReflectionMethod->invokeArgs()
- line 936 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit_Framework_TestCase->runTest()
- line 80 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit_Framework_TestCase->runBare()
- line 701 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
- line 892 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit_Framework_TestResult->run()
- line 753 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit_Framework_TestCase->run()
- line 465 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit_Framework_TestSuite->run()
- line 185 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit_TextUI_TestRunner->doRun()
- line 115 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit_TextUI_Command->run()
- line 47 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit_TextUI_Command::main()
/home/user/clients/moodle/lib/phpunit/classes/advanced_testcase.php:88
To re-run:
vendor/bin/phpunit core_coursecatlib_testcase lib/tests/coursecatlib_test.php
ERRORS!
Tests: 12, Assertions: 169, Errors: 1.
Do you have plans to convert the callback function format_grid_delete_course() to an observer?
Thanks in advance.