See Release Notes
Long Term Support Release
Differences Between: [Versions 401 and 402] [Versions 401 and 403]
Unit tests for the core_rating implementation of the Privacy API.
Copyright: | 2018 Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 437 lines (21 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
provider_test:: (7 methods):
rate_as_user()
test_get_sql_join()
test_get_sql_join_inner()
test_export_area_ratings()
test_delete_ratings()
test_delete_ratings_select()
assert_has_rating()
Class: provider_test - X-Ref
Unit tests for the core_rating implementation of the Privacy API.rate_as_user($userid, $component, $ratingarea, $itemid, $context, $score) X-Ref |
Rate something as a user. param: int $userid param: string $component param: string $ratingarea param: int $itemid param: \context $context param: string $score |
test_get_sql_join() X-Ref |
Ensure that the get_sql_join function returns valid SQL which returns the correct list of rated itemids. |
test_get_sql_join_inner() X-Ref |
Ensure that the get_sql_join function returns valid SQL which returns the correct list of rated itemids. This makes use of the optional inner join argument. |
test_export_area_ratings() X-Ref |
Ensure that export_area_ratings exports all ratings that a user has made, and all ratings for a users own content. |
test_delete_ratings() X-Ref |
Test delete_ratings() method. |
test_delete_ratings_select() X-Ref |
Test delete_ratings_select() method. |
assert_has_rating($author, $score, $actual) X-Ref |
Assert that a user has the correct rating. param: \stdClass $author The user with the rating param: int $score The rating that was given param: \stdClass[] The ratings which were found |