Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402]
Unit tests for grade/lib.php.
Copyright: | 2016 Jun Pataleta |
License: | http://www.gnu.org/copyleft/gpl.html GNU Public License |
File Size: | 777 lines (35 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
lib_test:: (7 methods):
test_can_output_item()
test_ungraded_counts_count_sumgrades()
test_ungraded_count_sumgrades_groups()
test_calculate_average()
calculate_average_data()
test_item_types()
test_get_gradable_users()
test_can_output_item() X-Ref |
Test can_output_item. |
test_ungraded_counts_count_sumgrades() X-Ref |
Tests that ungraded_counts calculates count and sum of grades correctly when there are graded users. |
test_ungraded_count_sumgrades_groups() X-Ref |
Tests that ungraded_counts calculates count and sum of grades correctly for groups when there are graded users. |
test_calculate_average(int $meanselection, array $expectedmeancount, array $expectedaverage) X-Ref |
Tests for calculate_average. param: int $meanselection Whether to inlcude all grades or non-empty grades in aggregation. param: array $expectedmeancount expected meancount value param: array $expectedaverage expceted average value |
calculate_average_data() X-Ref |
Data provider for test_calculate_average return: array of testing scenarios |
test_item_types() X-Ref |
Tests for item types. |
test_get_gradable_users() X-Ref |
Test get_gradable_users() function. |