[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Unit tests for (some of) ../moodlelib.php.
Author: | T.J.Hunt@open.ac.uk |
Author: | nicolas@moodle.com |
Copyright: | © 2006 The Open University |
File Size: | 3130 lines (143 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_moodlelib_testcase:: (84 methods):
define_local_decimal_separator()
test_cleanremoteaddr()
test_address_in_subnet()
test_fix_utf8()
test_optional_param()
test_optional_param_array()
test_required_param()
test_required_param_array()
test_clean_param()
test_clean_param_array()
test_clean_param_raw()
test_clean_param_trim()
test_clean_param_clean()
test_clean_param_alpha()
test_clean_param_alphanum()
test_clean_param_alphaext()
test_clean_param_sequence()
test_clean_param_component()
test_is_valid_plugin_name()
test_clean_param_plugin()
test_clean_param_area()
test_clean_param_text()
test_clean_param_url()
test_clean_param_localurl()
test_clean_param_file()
test_clean_param_path()
test_clean_param_username()
test_clean_param_stringid()
test_clean_param_timezone()
test_validate_param()
test_shorten_text_no_tags_already_short_enough()
test_shorten_text_with_tags_already_short_enough()
test_shorten_text_no_tags_needs_shortening()
test_shorten_text_with_tags_needs_shortening()
test_shorten_text_with_tags_and_html_comment()
test_shorten_text_with_entities()
test_shorten_text_known_tricky_case()
test_shorten_text_no_spaces()
test_shorten_text_utf8_european()
test_shorten_text_utf8_oriental()
test_shorten_text_multilang()
test_usergetdate()
test_mark_user_preferences_changed()
test_check_user_preferences_loaded()
test_set_user_preference()
test_get_extra_user_fields()
test_get_extra_user_fields_sql()
test_some_moodle_special_dst()
test_userdate()
test_dst_changes()
test_make_timestamp()
test_get_string()
test_get_string_limitation()
test_format_float()
test_unformat_float()
test_delete_user()
test_convert_to_array()
test_date_format_string()
test_get_config()
test_get_max_upload_sizes()
test_password_is_legacy_hash()
test_validate_internal_user_password()
test_hash_internal_user_password()
test_update_internal_user_password()
test_update_internal_user_password_no_cache()
test_update_internal_user_password_update_no_cache()
test_fullname()
test_get_all_user_name_fields()
test_order_in_string()
test_complete_user_login()
test_require_logout()
generate_email_messageid_provider()
test_generate_email_messageid()
diverted_emails_provider()
test_email_should_be_diverted()
test_email_to_user()
test_setnew_password_and_mail()
test_remove_course_contents()
test_username_load_fields_from_object()
test_count_words()
test_getremoteaddr()
test_random_bytes_emulate()
test_random_string()
test_complex_random_string()
Class: core_moodlelib_testcase - X-Ref
define_local_decimal_separator() X-Ref |
Define a local decimal separator. It is not possible to directly change the result of get_string in a unit test. Instead, we create a language pack for language 'xx' in dataroot and make langconfig.php with the string we need to change. The example separator used here is 'X'; on PHP 5.3 and before this must be a single byte character due to PHP bug/limitation in number_format, so you can't use UTF-8 characters. |
test_cleanremoteaddr() X-Ref |
No description |
test_address_in_subnet() X-Ref |
No description |
test_fix_utf8() X-Ref |
No description |
test_optional_param() X-Ref |
No description |
test_optional_param_array() X-Ref |
No description |
test_required_param() X-Ref |
No description |
test_required_param_array() X-Ref |
No description |
test_clean_param() X-Ref |
No description |
test_clean_param_array() X-Ref |
No description |
test_clean_param_raw() X-Ref |
No description |
test_clean_param_trim() X-Ref |
No description |
test_clean_param_clean() X-Ref |
No description |
test_clean_param_alpha() X-Ref |
No description |
test_clean_param_alphanum() X-Ref |
No description |
test_clean_param_alphaext() X-Ref |
No description |
test_clean_param_sequence() X-Ref |
No description |
test_clean_param_component() X-Ref |
No description |
test_is_valid_plugin_name() X-Ref |
No description |
test_clean_param_plugin() X-Ref |
No description |
test_clean_param_area() X-Ref |
No description |
test_clean_param_text() X-Ref |
No description |
test_clean_param_url() X-Ref |
No description |
test_clean_param_localurl() X-Ref |
No description |
test_clean_param_file() X-Ref |
No description |
test_clean_param_path() X-Ref |
No description |
test_clean_param_username() X-Ref |
No description |
test_clean_param_stringid() X-Ref |
No description |
test_clean_param_timezone() X-Ref |
No description |
test_validate_param() X-Ref |
No description |
test_shorten_text_no_tags_already_short_enough() X-Ref |
No description |
test_shorten_text_with_tags_already_short_enough() X-Ref |
No description |
test_shorten_text_no_tags_needs_shortening() X-Ref |
No description |
test_shorten_text_with_tags_needs_shortening() X-Ref |
No description |
test_shorten_text_with_tags_and_html_comment() X-Ref |
No description |
test_shorten_text_with_entities() X-Ref |
No description |
test_shorten_text_known_tricky_case() X-Ref |
No description |
test_shorten_text_no_spaces() X-Ref |
No description |
test_shorten_text_utf8_european() X-Ref |
No description |
test_shorten_text_utf8_oriental() X-Ref |
No description |
test_shorten_text_multilang() X-Ref |
No description |
test_usergetdate() X-Ref |
No description |
test_mark_user_preferences_changed() X-Ref |
No description |
test_check_user_preferences_loaded() X-Ref |
No description |
test_set_user_preference() X-Ref |
No description |
test_get_extra_user_fields() X-Ref |
No description |
test_get_extra_user_fields_sql() X-Ref |
No description |
test_some_moodle_special_dst() X-Ref |
Test some critical TZ/DST. This method tests some special TZ/DST combinations that were fixed by MDL-38999. The tests are done by comparing the results of the output using Moodle TZ/DST support and PHP native one. Note: If you don't trust PHP TZ/DST support, can verify the harcoded expectations below with: http://www.tools4noobs.com/online_tools/unix_timestamp_to_datetime/ |
test_userdate() X-Ref |
No description |
test_dst_changes() X-Ref |
Make sure the DST changes happen at the right time in Moodle. |
test_make_timestamp() X-Ref |
No description |
test_get_string() X-Ref |
Test get_string and most importantly the implementation of the lang_string object. |
test_get_string_limitation() X-Ref |
test_format_float() X-Ref |
Test localised float formatting. |
test_unformat_float() X-Ref |
Test localised float unformatting. |
test_delete_user() X-Ref |
Test deleting of users. |
test_convert_to_array() X-Ref |
Test function convert_to_array() |
test_date_format_string() X-Ref |
Test the function date_format_string(). |
test_get_config() X-Ref |
No description |
test_get_max_upload_sizes() X-Ref |
No description |
test_password_is_legacy_hash() X-Ref |
Test function password_is_legacy_hash(). |
test_validate_internal_user_password() X-Ref |
Test function validate_internal_user_password(). |
test_hash_internal_user_password() X-Ref |
Test function hash_internal_user_password(). |
test_update_internal_user_password() X-Ref |
Test function update_internal_user_password(). |
test_update_internal_user_password_no_cache() X-Ref |
Testing that if the password is not cached, that it does not update the user table and fire event. |
test_update_internal_user_password_update_no_cache() X-Ref |
Test if the user has a password hash, but now their auth method says not to cache it. Then it should update. |
test_fullname() X-Ref |
No description |
test_get_all_user_name_fields() X-Ref |
No description |
test_order_in_string() X-Ref |
No description |
test_complete_user_login() X-Ref |
No description |
test_require_logout() X-Ref |
Test require_logout. |
generate_email_messageid_provider() X-Ref |
A data provider for testing email messageid |
test_generate_email_messageid($wwwroot, $msgids) X-Ref |
Test email message id generation param: string $wwwroot The wwwroot param: array $msgids An array of msgid local parts and the final result |
diverted_emails_provider() X-Ref |
A data provider for testing email diversion |
test_email_should_be_diverted($divertallemailsto, $divertallemailsexcept, $addresses, $expected) X-Ref |
Test email diversion param: string $divertallemailsto An optional email address param: string $divertallemailsexcept An optional exclusion list param: array $addresses An array of test addresses param: boolean $expected Expected result |
test_email_to_user() X-Ref |
No description |
test_setnew_password_and_mail() X-Ref |
Test setnew_password_and_mail. |
test_remove_course_contents() X-Ref |
Test remove_course_content deletes course contents TODO Add asserts to verify other data related to course is deleted as well. |
test_username_load_fields_from_object() X-Ref |
Test function username_load_fields_from_object(). |
test_count_words() X-Ref |
Test function count_words(). |
test_getremoteaddr() X-Ref |
Tests the getremoteaddr() function. |
test_random_bytes_emulate() X-Ref |
No description |
test_random_string() X-Ref |
Test function for creation of random strings. |
test_complex_random_string() X-Ref |
Test function for creation of complex random strings. |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |