Differences Between: [Versions 401 and 403]
(no description)
File Size: | 999 lines (43 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
template_test:: (7 methods):
setupBeforeClass()
test_parse_entries()
parse_entries_provider()
enable_portfolio()
enable_ratings()
test_parse_add_entry()
parse_add_entry_provider()
Class: template_test - X-Ref
Template tests class for mod_data.setupBeforeClass() X-Ref |
Setup to ensure that fixtures are loaded. |
test_parse_entries(string $templatecontent,string $expected,string $rolename = 'editingteacher',bool $enableexport = false,bool $approved = true,bool $enablecomments = false,bool $enableratings = false,array $options = [],bool $otherauthor = false) X-Ref |
Test for static create methods. param: string $templatecontent the template string param: string $expected expected output param: string $rolename the user rolename param: bool $enableexport is portfolio export is enabled param: bool $approved if the entry is approved param: bool $enablecomments is comments are enabled param: bool $enableratings if ratings are enabled param: array $options extra parser options param: bool $otherauthor if the entry is from another user |
parse_entries_provider() X-Ref |
Data provider for test_parse_entries(). return: array of scenarios |
enable_portfolio(stdClass $user) X-Ref |
Create all the necessary data to enable portfolio export in mod_data param: stdClass $user the current user record. |
enable_ratings(context_module $context, stdClass $activity, array $entries, stdClass $user) X-Ref |
Enable the ratings on the database entries. param: context_module $context the activity context param: stdClass $activity the activity record param: array $entries database entries param: stdClass $user the current user record return: stdClass the entries with the rating attribute |
test_parse_add_entry(string $templatecontent,string $expected,bool $newentry = false) X-Ref |
Test parse add entry template parsing. param: string $templatecontent the template string param: string $expected expected output param: bool $newentry if it is a new entry or editing and existing one |
parse_add_entry_provider() X-Ref |
Data provider for test_parse_add_entry(). return: array of scenarios |