remotelearner / moodle-block_grade_me

14 stars 37 forks source link

Unit tests broken in > Moodle 4.1 #69

Closed matthewhilton closed 1 week ago

matthewhilton commented 1 year ago

Since https://tracker.moodle.org/browse/MDL-64600 and https://tracker.moodle.org/browse/MDL-67673 lots of the tests are not running properly.

This is because of the removal of DB unit, so functions such as createXMLDataSet are not longer allowed.

e.g.

5) block_grade_me_testcase::test_query_glossary with data set "test1" ('glossary.xml', array(array(0, '0', 'glossary', 0, 'glossaryitem1', 0, 0, 0, 1424354368, 1), array(0, '0', 'glossary', 1, 'glossaryitem2', 1, 0, 0, 1424354369, 2), array(0, '0', 'glossary', 2, 'glossaryitem3', 2, 0, 0, 1424354370, 3)))
Error: Call to undefined method phpunit_dataset::getTableNames()

/var/www/ec-41/blocks/grade_me/tests/grade_me_test.php:56
/var/www/ec-41/blocks/grade_me/tests/grade_me_test.php:665
/var/www/ec-41/blocks/grade_me/tests/grade_me_test.php:595
/var/www/ec-41/lib/phpunit/classes/advanced_testcase.php:80
logan-reynolds commented 1 week ago

Thank you for your contributions; changes have been manually merged into the MOODLE_401_STABLE and subsequent higher branches with original single-author commit listed in the branch history to keep things tidy, so I'll proceed to close this issue out as complete.