-
Bug
-
Resolution: Fixed
-
Minor
-
2.6.3
-
MOODLE_26_STABLE
-
MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
-
wip-
MDL-45688-master -
I got this error when running unittests on custom module but the same can be reproduced if one exectutes:
vendor/bin/phpunit mod/chat/tests/generator_test.php
|
Error:
PHP Fatal error: Class 'grade_outcome' not found in /home/marina/repositories/moodle26/moodle/course/modlib.php on line 227
|
PHP Stack trace:
|
PHP 1. {main}() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/composer/bin/phpunit:0
|
PHP 2. PHPUnit_TextUI_Command::main() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/composer/bin/phpunit:63
|
PHP 3. PHPUnit_TextUI_Command->run() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:129
|
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:176
|
PHP 5. PHPUnit_Framework_TestSuite->run() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:350
|
PHP 6. PHPUnit_Framework_TestSuite->runTest() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:749
|
PHP 7. PHPUnit_Framework_TestCase->run() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:779
|
PHP 8. PHPUnit_Framework_TestResult->run() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:783
|
PHP 9. advanced_testcase->runBare() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php:648
|
PHP 10. PHPUnit_Framework_TestCase->runBare() /home/marina/repositories/moodle26/moodle/lib/phpunit/classes/advanced_testcase.php:80
|
PHP 11. PHPUnit_Framework_TestCase->runTest() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:838
|
PHP 12. ReflectionMethod->invokeArgs() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:988
|
PHP 13. mod_chat_generator_testcase->test_create_instance() /home/marina/repositories/moodle26/moodle/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:988
|
PHP 14. testing_data_generator->create_module() /home/marina/repositories/moodle26/moodle/mod/chat/tests/generator_test.php:42
|
PHP 15. mod_chat_generator->create_instance() /home/marina/repositories/moodle26/moodle/lib/testing/generator/data_generator.php:435
|
PHP 16. testing_module_generator->create_instance() /home/marina/repositories/moodle26/moodle/mod/chat/tests/generator/lib.php:72
|
PHP 17. add_moduleinfo() /home/marina/repositories/moodle26/moodle/lib/testing/generator/module_generator.php:265
|
PHP 18. edit_module_post_actions() /home/marina/repositories/moodle26/moodle/course/modlib.php:164
|