[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/tests/ -> courselib_test.php (summary)

Course related unit tests

Copyright: 2012 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 2923 lines (138 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_course_courselib_testcase:: (59 methods):
  forum_create_set_values()
  forum_create_run_asserts()
  assign_create_set_values()
  assign_create_run_asserts()
  create_specific_module_test()
  test_create_module()
  test_update_module()
  forum_update_set_values()
  forum_update_run_asserts()
  update_specific_module_test()
  provider_course_delete_module()
  test_create_course()
  test_create_course_with_generator()
  test_create_course_sections()
  test_update_course()
  test_course_add_cm_to_section()
  test_reorder_sections()
  test_move_section_down()
  test_move_section_up()
  test_move_section_marker()
  test_course_can_delete_section()
  test_course_delete_section()
  test_get_course_display_name_for_list()
  test_move_module_in_course()
  test_module_visibility()
  test_section_visibility_events()
  test_section_visibility()
  check_module_visibility()
  test_course_page_type_list()
  test_compare_activities_by_time_desc()
  test_compare_activities_by_time_asc()
  test_moveto_module_between_hidden_sections()
  test_moveto_module_in_same_section()
  test_course_delete_module()
  test_course_created_event()
  test_course_updated_event()
  test_course_deleted_event()
  test_course_content_deleted_event()
  test_course_category_deleted_event()
  test_course_restored_event()
  test_course_section_updated_event()
  test_course_section_deleted_event()
  test_course_integrity_check()
  test_course_module_created_event()
  test_course_module_created_event_exceptions()
  test_course_module_updated_event()
  test_course_module_create_from_cm()
  test_course_module_updated_event_exceptions()
  test_course_module_deleted_event()
  test_course_module_deleted_event_exceptions()
  get_user_objects()
  test_course_change_sortorder_after_course()
  test_course_change_visibility()
  test_course_change_sortorder_by_one()
  test_view_resources_list()
  test_duplicate_module()
  test_empty_availability_settings()
  test_update_module_name_inplace()
  test_course_get_tagged_course_modules()


Class: core_course_courselib_testcase  - X-Ref

forum_create_set_values(&$moduleinfo)   X-Ref
Set forum specific test values for calling create_module().

param: object $moduleinfo - the moduleinfo to add some specific values - passed in reference.

forum_create_run_asserts($moduleinfo, $dbmodinstance)   X-Ref
Execute test asserts on the saved DB data by create_module($forum).

param: object $moduleinfo - the specific forum values that were used to create a forum.
param: object $dbmodinstance - the DB values of the created forum.

assign_create_set_values(&$moduleinfo)   X-Ref
Set assign module specific test values for calling create_module().

param: object $moduleinfo - the moduleinfo to add some specific values - passed in reference.

assign_create_run_asserts($moduleinfo, $dbmodinstance)   X-Ref
Execute test asserts on the saved DB data by create_module($assign).

param: object $moduleinfo - the specific assign module values that were used to create an assign module.
param: object $dbmodinstance - the DB values of the created assign module.

create_specific_module_test($modulename)   X-Ref
Run some asserts test for a specific module for the function create_module().

The function has been created (and is called) for $this->test_create_module().
Note that the call to MODULE_create_set_values and MODULE_create_run_asserts are done after the common set values/run asserts.
So if you want, you can overwrite the default values/asserts in the respective functions.
param: string $modulename Name of the module ('forum', 'assign', 'book'...).

test_create_module()   X-Ref
Test create_module() for multiple modules defined in the $modules array (first declaration of the function).


test_update_module()   X-Ref
Test update_module() for multiple modules defined in the $modules array (first declaration of the function).


forum_update_set_values(&$moduleinfo)   X-Ref
Set forum specific test values for calling update_module().

param: object $moduleinfo - the moduleinfo to add some specific values - passed in reference.

forum_update_run_asserts($moduleinfo, $dbmodinstance)   X-Ref
Execute test asserts on the saved DB data by update_module($forum).

param: object $moduleinfo - the specific forum values that were used to update a forum.
param: object $dbmodinstance - the DB values of the updated forum.

update_specific_module_test($modulename)   X-Ref
Test a specific type of module.

param: string $modulename - the module name to test

provider_course_delete_module()   X-Ref
Data provider for course_delete module

return: array An array of arrays contain test data

test_create_course()   X-Ref
Test the create_course function


test_create_course_with_generator()   X-Ref
No description

test_create_course_sections()   X-Ref
No description

test_update_course()   X-Ref
No description

test_course_add_cm_to_section()   X-Ref
No description

test_reorder_sections()   X-Ref
No description

test_move_section_down()   X-Ref
No description

test_move_section_up()   X-Ref
No description

test_move_section_marker()   X-Ref
No description

test_course_can_delete_section()   X-Ref
No description

test_course_delete_section()   X-Ref
No description

test_get_course_display_name_for_list()   X-Ref
No description

test_move_module_in_course()   X-Ref
No description

test_module_visibility()   X-Ref
No description

test_section_visibility_events()   X-Ref
No description

test_section_visibility()   X-Ref
No description

check_module_visibility($mod, $visibility, $visibleold)   X-Ref
Helper function to assert that a module has correctly been made visible, or hidden.

param: stdClass $mod module information
param: int $visibility the current state of the module
param: int $visibleold the current state of the visibleold property
return: void

test_course_page_type_list()   X-Ref
No description

test_compare_activities_by_time_desc()   X-Ref
No description

test_compare_activities_by_time_asc()   X-Ref
No description

test_moveto_module_between_hidden_sections()   X-Ref
Tests moving a module between hidden/visible sections and
verifies that the course/module visiblity seettings are
retained.


test_moveto_module_in_same_section()   X-Ref
Tests moving a module around in the same section. moveto_module()
is called this way in modduplicate.


test_course_delete_module($type, $options)   X-Ref
Tests the function that deletes a course module

param: string $type The type of module for the test
param: array $options The options for the module creation

test_course_created_event()   X-Ref
Test that triggering a course_created event works as expected.


test_course_updated_event()   X-Ref
Test that triggering a course_updated event works as expected.


test_course_deleted_event()   X-Ref
Test that triggering a course_deleted event works as expected.


test_course_content_deleted_event()   X-Ref
Test that triggering a course_content_deleted event works as expected.


test_course_category_deleted_event()   X-Ref
Test that triggering a course_category_deleted event works as expected.


test_course_restored_event()   X-Ref
Test that triggering a course_restored event works as expected.


test_course_section_updated_event()   X-Ref
Test that triggering a course_section_updated event works as expected.


test_course_section_deleted_event()   X-Ref
Test that triggering a course_section_deleted event works as expected.


test_course_integrity_check()   X-Ref
No description

test_course_module_created_event()   X-Ref
Tests for event related to course module creation.


test_course_module_created_event_exceptions()   X-Ref
Tests for event validations related to course module creation.


test_course_module_updated_event()   X-Ref
Tests for event related to course module updates.


test_course_module_create_from_cm()   X-Ref
Tests for create_from_cm method.


test_course_module_updated_event_exceptions()   X-Ref
Tests for event validations related to course module update.


test_course_module_deleted_event()   X-Ref
Tests for event related to course module delete.


test_course_module_deleted_event_exceptions()   X-Ref
Tests for event validations related to course module deletion.


get_user_objects(testing_data_generator $generator, $contextid)   X-Ref
Returns a user object and its assigned new role.

param: testing_data_generator $generator
param: $contextid
return: array The user object and the role ID

test_course_change_sortorder_after_course()   X-Ref
Test course move after course.


test_course_change_visibility()   X-Ref
Tests changing the visibility of a course.


test_course_change_sortorder_by_one()   X-Ref
Tests moving the course up and down by one.


test_view_resources_list()   X-Ref
No description

test_duplicate_module()   X-Ref
Test duplicate_module()


test_empty_availability_settings()   X-Ref
Tests that when creating or updating a module, if the availability settings
are present but set to an empty tree, availability is set to null in
database.


test_update_module_name_inplace()   X-Ref
Test update_inplace_editable()


test_course_get_tagged_course_modules()   X-Ref
Testing function course_get_tagged_course_modules - search tagged course modules




Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1