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

phpunittest error: tool_dataprivacy_expired_contexts_testcase::test_expired_course_related_contexts Unexpected debugging() call detected. #67

Closed
mwuttke opened this issue Aug 31, 2018 · 0 comments

Comments

@mwuttke
Copy link

mwuttke commented Aug 31, 2018

Hello,
I've got the following error message during the phpunit test:

Moodle 3.5.1+ (Build: 20180831), ref: refs/heads/MOODLE_351+_STABLE
Php: 7.0.30.0.9.1, pgsql: 10.5 (Debian 10.5-1.pgdg90+1), OS: Linux 4.17.0-0.bpo.3-amd64 x86_64
PHPUnit 6.5.12 by Sebastian Bergmann and contributors.

...

  1. tool_dataprivacy_expired_contexts_testcase::test_expired_course_related_contexts
    Unexpected debugging() call detected.
    Debugging: Use of undefined constant COURSE_MODULE - assumed 'COURSE_MODULE'
  • line 309 of /mod/groupformation/classes/privacy/provider.php: call to PHPUnit\Util\ErrorHandler::handleError()
  • line 7778 of /lib/moodlelib.php: call to mod_groupformation\privacy\provider::delete_data_for_all_users_in_context()
  • line 495 of /privacy/classes/manager.php: call to component_class_callback()
  • line 528 of /privacy/classes/manager.php: call to core_privacy\manager::component_class_callback()
  • line 409 of /privacy/classes/manager.php: call to core_privacy\manager->handled_component_class_callback()
  • line 135 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to core_privacy\manager->delete_data_for_all_users_in_context()
  • line 99 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to tool_dataprivacy\expired_contexts_manager->delete_expired_context()
  • line 212 of /admin/tool/dataprivacy/tests/expired_contexts_test.php: call to tool_dataprivacy\expired_contexts_manager->delete()
  • line ? of unknownfile: call to tool_dataprivacy_expired_contexts_testcase->test_expired_course_related_contexts()
  • line 1071 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to ReflectionMethod->invokeArgs()
  • line 939 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 698 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
  • line 894 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
  • line 546 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
  • line 195 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->doRun()
  • line 148 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
  • line 53 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
    Debugging: Use of undefined constant COURSE_MODULE - assumed 'COURSE_MODULE'
  • line 309 of /mod/groupformation/classes/privacy/provider.php: call to PHPUnit\Util\ErrorHandler::handleError()
  • line 7778 of /lib/moodlelib.php: call to mod_groupformation\privacy\provider::delete_data_for_all_users_in_context()
  • line 495 of /privacy/classes/manager.php: call to component_class_callback()
  • line 528 of /privacy/classes/manager.php: call to core_privacy\manager::component_class_callback()
  • line 409 of /privacy/classes/manager.php: call to core_privacy\manager->handled_component_class_callback()
  • line 135 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to core_privacy\manager->delete_data_for_all_users_in_context()
  • line 99 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to tool_dataprivacy\expired_contexts_manager->delete_expired_context()
  • line 224 of /admin/tool/dataprivacy/tests/expired_contexts_test.php: call to tool_dataprivacy\expired_contexts_manager->delete()
  • line ? of unknownfile: call to tool_dataprivacy_expired_contexts_testcase->test_expired_course_related_contexts()
  • line 1071 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to ReflectionMethod->invokeArgs()
  • line 939 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 698 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
  • line 894 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
  • line 546 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
  • line 195 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->doRun()
  • line 148 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
  • line 53 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
    Debugging: Use of undefined constant COURSE_MODULE - assumed 'COURSE_MODULE'
  • line 309 of /mod/groupformation/classes/privacy/provider.php: call to PHPUnit\Util\ErrorHandler::handleError()
  • line 7778 of /lib/moodlelib.php: call to mod_groupformation\privacy\provider::delete_data_for_all_users_in_context()
  • line 495 of /privacy/classes/manager.php: call to component_class_callback()
  • line 528 of /privacy/classes/manager.php: call to core_privacy\manager::component_class_callback()
  • line 409 of /privacy/classes/manager.php: call to core_privacy\manager->handled_component_class_callback()
  • line 135 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to core_privacy\manager->delete_data_for_all_users_in_context()
  • line 99 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to tool_dataprivacy\expired_contexts_manager->delete_expired_context()
  • line 224 of /admin/tool/dataprivacy/tests/expired_contexts_test.php: call to tool_dataprivacy\expired_contexts_manager->delete()
  • line ? of unknownfile: call to tool_dataprivacy_expired_contexts_testcase->test_expired_course_related_contexts()
  • line 1071 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to ReflectionMethod->invokeArgs()
  • line 939 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 698 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
  • line 894 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
  • line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
  • line 546 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
  • line 195 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->doRun()
  • line 148 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
  • line 53 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()

Please could you have a look at this error.

Cheers,
Michael

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

No branches or pull requests

3 participants