Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 and 403]

Unit tests for blog external API.

Copyright: 2018 Juan Leyva
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 636 lines (27 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: external_test  - X-Ref

Unit tests for blog external API.

setUp()   X-Ref
No description

test_get_public_entries_global_level_by_non_logged_users()   X-Ref
Get global public entries even for not authenticated users.
We get the entry since is public.


test_get_public_entries_global_level_by_non_logged_users_closed_site()   X-Ref
Get global public entries even for not authenticated users in closed site.


test_get_public_entries_global_level_by_guest_users()   X-Ref
Get global public entries for guest users.
We get the entry since is public.


test_get_not_public_entries_global_level_by_non_logged_users()   X-Ref
Get global not public entries even for not authenticated users withouth being authenticated.
We don't get any because they are not public (restricted to site users).


test_get_not_public_entries_global_level_by_guest_user()   X-Ref
Get global not public entries users being guest.
We don't get any because they are not public (restricted to real site users).


test_get_not_public_entries_site_level_by_non_logged_users()   X-Ref
Get site not public entries for not authenticated users.
We don't get any because they are not public (restricted to real site users).


test_get_not_public_entries_site_level_by_guest_users()   X-Ref
Get site not public entries for guest users.
We don't get any because they are not public (restricted to real site users).


test_get_site_entries_site_level_by_normal_users()   X-Ref
Get site entries at site level by system users.


test_get_draft_entries_site_level_by_author_users()   X-Ref
Get draft site entries by authors.


test_get_draft_entries_site_level_by_not_author_users()   X-Ref
Get draft site entries by not authors.


test_get_draft_entries_site_level_by_admin_users()   X-Ref
Get draft site entries by admin.


test_get_draft_entries_user_level_by_author_users()   X-Ref
Get draft user entries by authors.


test_get_draft_entries_user_level_by_not_author_users()   X-Ref
Get draft user entries by not authors.


test_get_draft_entries_user_level_by_admin_users()   X-Ref
Get draft user entries by admin.


test_get_all_entries_including_pagination()   X-Ref
Test get all entries including testing pagination.


test_get_entries_filtering_by_course()   X-Ref
Test get entries filtering by course.


test_get_entries_filtering_by_module()   X-Ref
Test get entries filtering by module.


test_get_entries_filtering_by_author()   X-Ref
Test get entries filtering by author.


test_get_entries_filtering_by_entry()   X-Ref
Test get entries filtering by entry.


test_get_entries_filtering_by_search()   X-Ref
Test get entries filtering by search.


test_get_entries_filtering_by_tag()   X-Ref
Test get entries filtering by tag.


test_get_entries_filtering_by_tagid()   X-Ref
Test get entries filtering by tag id.


test_get_entries_filtering_by_group()   X-Ref
Test get entries filtering by group.


test_get_entries_multiple_filter()   X-Ref
Test get entries multiple filter.


test_get_entries_filtering_by_invalid_filter()   X-Ref
Test get entries filtering by invalid_filter.


test_get_entries_blog_disabled()   X-Ref
Test get entries when blog is disabled.


test_view_blog_entries_without_filtering()   X-Ref
Test view_blog_entries without filter.


test_view_blog_entries_with_filtering()   X-Ref
Test view_blog_entries doing filtering.