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 310 and 311] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

File Size: 1405 lines (65 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

externallib_test:: (39 methods):
  setUp()
  create_collaborative_wikis_with_groups()
  create_individual_wikis_with_groups()
  test_mod_wiki_get_wikis_by_courses()
  test_view_wiki()
  test_view_page()
  test_get_subwikis()
  test_get_subwiki_pages_invalid_instance()
  test_get_subwiki_pages_unenrolled_user()
  test_get_subwiki_pages_hidden_wiki_as_student()
  test_get_subwiki_pages_without_viewpage_capability()
  test_get_subwiki_pages_invalid_userid()
  test_get_subwiki_pages_invalid_groupid()
  test_get_subwiki_pages_individual_student_see_other_user()
  test_get_subwiki_pages_collaborative_separate_groups_student_see_other_group()
  test_get_subwiki_pages_individual_separate_groups_student_see_other_group()
  test_get_subwiki_pages_collaborative_separate_groups_student_see_all_participants()
  test_get_subwiki_pages_individual_separate_groups_student_see_all_participants()
  test_get_subwiki_pages_collaborative()
  test_get_subwiki_pages_individual()
  test_get_subwiki_pages_separate_groups_collaborative()
  test_get_subwiki_pages_visible_groups_collaborative()
  test_get_subwiki_pages_separate_groups_individual()
  test_get_subwiki_pages_visible_groups_individual()
  test_get_page_contents_invalid_pageid()
  test_get_page_contents_unenrolled_user()
  test_get_page_contents_hidden_wiki_as_student()
  test_get_page_contents_without_viewpage_capability()
  test_get_page_contents_separate_groups_student_see_other_group()
  test_get_page_contents()
  test_get_page_contents_with_groups()
  test_get_subwiki_files_no_files()
  test_get_subwiki_files_separate_groups_student_see_other_group()
  test_get_subwiki_files_collaborative_no_groups()
  test_get_subwiki_files_visible_groups_individual()
  test_get_page_for_editing()
  test_get_page_locking()
  test_new_page()
  test_edit_page()


Class: externallib_test  - X-Ref

Wiki module external functions tests

setUp()   X-Ref
Set up for every test


create_collaborative_wikis_with_groups()   X-Ref
Create two collaborative wikis (separate/visible groups), 2 groups and a first page for each wiki and group.


create_individual_wikis_with_groups()   X-Ref
Create two individual wikis (separate/visible groups), 2 groups and a first page for each wiki and group.


test_mod_wiki_get_wikis_by_courses()   X-Ref
No description

test_view_wiki()   X-Ref
Test view_wiki.


test_view_page()   X-Ref
Test view_page.


test_get_subwikis()   X-Ref
Test get_subwikis.


test_get_subwiki_pages_invalid_instance()   X-Ref
Test get_subwiki_pages using an invalid wiki instance.


test_get_subwiki_pages_unenrolled_user()   X-Ref
Test get_subwiki_pages using a user not enrolled in the course.


test_get_subwiki_pages_hidden_wiki_as_student()   X-Ref
Test get_subwiki_pages using a hidden wiki as student.


test_get_subwiki_pages_without_viewpage_capability()   X-Ref
Test get_subwiki_pages without the viewpage capability.


test_get_subwiki_pages_invalid_userid()   X-Ref
Test get_subwiki_pages using an invalid userid.


test_get_subwiki_pages_invalid_groupid()   X-Ref
Test get_subwiki_pages using an invalid groupid.


test_get_subwiki_pages_individual_student_see_other_user()   X-Ref
Test get_subwiki_pages, check that a student can't see another user pages in an individual wiki without groups.


test_get_subwiki_pages_collaborative_separate_groups_student_see_other_group()   X-Ref
Test get_subwiki_pages, check that a student can't get the pages from another group in
a collaborative wiki using separate groups.


test_get_subwiki_pages_individual_separate_groups_student_see_other_group()   X-Ref
Test get_subwiki_pages, check that a student can't get the pages from another group in
an individual wiki using separate groups.


test_get_subwiki_pages_collaborative_separate_groups_student_see_all_participants()   X-Ref
Test get_subwiki_pages, check that a student can't get the pages from all participants in
a collaborative wiki using separate groups.


test_get_subwiki_pages_individual_separate_groups_student_see_all_participants()   X-Ref
Test get_subwiki_pages, check that a student can't get the pages from all participants in
an individual wiki using separate groups.


test_get_subwiki_pages_collaborative()   X-Ref
Test get_subwiki_pages without groups and collaborative wiki.


test_get_subwiki_pages_individual()   X-Ref
Test get_subwiki_pages without groups.


test_get_subwiki_pages_separate_groups_collaborative()   X-Ref
Test get_subwiki_pages with groups and collaborative wikis.


test_get_subwiki_pages_visible_groups_collaborative()   X-Ref
Test get_subwiki_pages with groups and collaborative wikis.


test_get_subwiki_pages_separate_groups_individual()   X-Ref
Test get_subwiki_pages with groups and individual wikis.


test_get_subwiki_pages_visible_groups_individual()   X-Ref
Test get_subwiki_pages with groups and individual wikis.


test_get_page_contents_invalid_pageid()   X-Ref
Test get_page_contents using an invalid pageid.


test_get_page_contents_unenrolled_user()   X-Ref
Test get_page_contents using a user not enrolled in the course.


test_get_page_contents_hidden_wiki_as_student()   X-Ref
Test get_page_contents using a hidden wiki as student.


test_get_page_contents_without_viewpage_capability()   X-Ref
Test get_page_contents without the viewpage capability.


test_get_page_contents_separate_groups_student_see_other_group()   X-Ref
Test get_page_contents, check that a student can't get a page from another group when
using separate groups.


test_get_page_contents()   X-Ref
Test get_page_contents without groups. We won't test all the possible cases because that's already
done in the tests for get_subwiki_pages.


test_get_page_contents_with_groups()   X-Ref
Test get_page_contents with groups. We won't test all the possible cases because that's already
done in the tests for get_subwiki_pages.


test_get_subwiki_files_no_files()   X-Ref
Test get_subwiki_files using a wiki without files.


test_get_subwiki_files_separate_groups_student_see_other_group()   X-Ref
Test get_subwiki_files, check that a student can't get files from another group's subwiki when
using separate groups.


test_get_subwiki_files_collaborative_no_groups()   X-Ref
Test get_subwiki_files using a collaborative wiki without groups.


test_get_subwiki_files_visible_groups_individual()   X-Ref
Test get_subwiki_files using an individual wiki with visible groups.


test_get_page_for_editing()   X-Ref
Test get_page_for_editing. We won't test all the possible cases because that's already
done in the tests for wiki_parser_proxy::get_section.


test_get_page_locking()   X-Ref
Test test_get_page_locking.


test_new_page()   X-Ref
Test new_page. We won't test all the possible cases because that's already
done in the tests for wiki_create_page.


test_edit_page()   X-Ref
Test edit_page. We won't test all the possible cases because that's already
done in the tests for wiki_save_section / wiki_save_page.