@@ -44,36 +44,18 @@ existingtests=$(cd ${gitdir} && find . -name tests | sed 's/^\.\/\(.*\)$/\1/g')
4444ignoretests=" "
4545
4646# Unit test classes to look for with each file (must be 1 and only 1). MDLSITE-2096
47- # TODO: Some day replace this with the list of abstract classes, using some classmap going up to phpunit top class .
47+ # TODO: When we stop supporting these class names, we can remove them .
4848unittestclasses="
49- advanced_testcase
5049 area_test_base
5150 badgeslib_test
52- base_testcase
53- basic_testcase
5451 cachestore_tests
55- core_backup_backup_restore_base_testcase
56- core_reportbuilder_testcase
5752 data_loading_method_test_base
58- data_privacy_testcase
59- database_driver_testcase
60- externallib_advanced_testcase
61- googledocs_content_testcase
62- grade_base_testcase
63- lti_advantage_testcase
6453 manage_category_test_base
6554 messagelib_test
66- mod_assign\\\\ externallib_advanced_testcase
67- mod_lti_testcase
68- mod_quiz_attempt_walkthrough_from_csv_testcase
6955 mod_quiz\\\\ attempt_walkthrough_from_csv_test
70- provider_testcase
7156 qbehaviour_walkthrough_test_base
7257 question_attempt_upgrader_test_base
73- question_testcase
74- repository_googledocs_testcase
75- restore_date_testcase
76- route_testcase
58+ [\\ a-z0-9_]*_testcase
7759"
7860
7961# Verify that each existing test is covered by some defined test
10587 echo " ERROR: ${existing} is not matched/covered by any definition in phpunit.xml !"
10688 exitstatus=1
10789 fi
90+
10891 # Look inside all the test files, counting occurrences of $unittestclasses
10992 unittestclassesregex=$( echo ${unittestclasses} | sed ' s/ /|/g' )
93+
11094 for testfile in $( ls ${existing} | grep " _test.php$" )
11195 do
11296 # This is not the best (more accurate) regexp, but should be ok 99.99% of times.
0 commit comments