See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
Testing the service layer within core_favourites.
Copyright: | 2018 Jake Dallimore <jrhdallimore@gmail.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 517 lines (25 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
user_favourite_service_testcase:: (16 methods):
setUp()
setup_users_and_courses()
get_mock_repository()
test_get_service_for_user_context()
test_create_favourite_basic()
test_create_favourite_nonexistent_component()
test_find_favourites_by_type_single_user()
test_find_all_favourites()
test_find_favourites_by_type_multiple_users()
test_find_favourites_by_type_nonexistent_component()
test_find_favourites_by_type_pagination()
test_delete_favourite_basic()
test_favourite_exists()
test_get_favourite()
test_count_favourites_by_type()
test_get_join_sql_by_type()
Class: user_favourite_service_testcase - X-Ref
Test class covering the user_favourite_service within the service layer of favourites.setUp() X-Ref |
No description |
setup_users_and_courses() X-Ref |
No description |
get_mock_repository(array $mockstore) X-Ref |
Generates an in-memory repository for testing, using an array store for CRUD stuff. param: array $mockstore return: \PHPUnit\Framework\MockObject\MockObject |
test_get_service_for_user_context() X-Ref |
Test getting a user_favourite_service from the static locator. |
test_create_favourite_basic() X-Ref |
Test confirming an item can be favourited only once. |
test_create_favourite_nonexistent_component() X-Ref |
Test confirming that an exception is thrown if trying to favourite an item for a non-existent component. |
test_find_favourites_by_type_single_user() X-Ref |
Test fetching favourites for single user, by area. |
test_find_all_favourites() X-Ref |
Test fetching favourites for single user, by area. |
test_find_favourites_by_type_multiple_users() X-Ref |
Make sure the find_favourites_by_type() method only returns favourites for the scoped user. |
test_find_favourites_by_type_nonexistent_component() X-Ref |
Test confirming that an exception is thrown if trying to get favourites for a non-existent component. |
test_find_favourites_by_type_pagination() X-Ref |
Test confirming the pagination support for the find_favourites_by_type() method. |
test_delete_favourite_basic() X-Ref |
Test confirming the basic deletion behaviour. |
test_favourite_exists() X-Ref |
Test confirming the behaviour of the favourite_exists() method. |
test_get_favourite() X-Ref |
Test confirming the behaviour of the get_favourite() method. |
test_count_favourites_by_type() X-Ref |
Test confirming the behaviour of the count_favourites_by_type() method. |
test_get_join_sql_by_type() X-Ref |
Verify that the join sql generated by get_join_sql_by_type is valid and can be used to include favourite information. |