Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]
(no description)
File Size: | 769 lines (27 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file lib/tests/fixtures/stats_events.php |
statslib_test:: (20 methods):
setUp()
prepare_db()
generate_replacement_list()
load_xml_data_file()
daily_log_provider()
get_base_weekly_provider()
verify_stats()
test_statslib_progress_debug()
test_statslib_progress_no_debug()
test_statslib_get_start_from()
test_statslib_get_base_daily()
test_statslib_get_next_day_start()
test_statslib_get_base_weekly()
test_statslib_get_action_names()
test_statslib_temp_table_create_and_drop()
test_statslib_temp_table_fill()
test_statslib_temp_table_setup()
test_statslib_temp_table_clean()
test_statslib_cron_daily()
test_statslib_cron_daily_no_default_profile_id()
Class: statslib_test - X-Ref
Test functions that affect daily stats.setUp() X-Ref |
Setup function - Allow changes to CFG->debug for testing purposes. |
prepare_db($dataset, $tables) X-Ref |
Function to setup database. param: phpunit_dataset $dataset Containing all the information loaded from fixtures. param: array $filter Tables to be sent to database. |
generate_replacement_list() X-Ref |
Load dataset from XML file. |
load_xml_data_file($file) X-Ref |
Load dataset from XML file. param: string $file The name of the file to load return: phpunit_dataset |
daily_log_provider() X-Ref |
Provides the log data for test_statslib_cron_daily. return: array of fixture XML log file names. |
get_base_weekly_provider() X-Ref |
Set of data for test_statlibs_get_base_weekly return: array Dates and timezones for which the first day of the week will be calculated |
verify_stats($expected, $output = '') X-Ref |
Compare the expected stats to those in the database. param: array $expected param: string $output |
test_statslib_progress_debug() X-Ref |
Test progress output when debug is on. |
test_statslib_progress_no_debug() X-Ref |
Test progress output when debug is off. |
test_statslib_get_start_from() X-Ref |
Test the function that gets the start date from the config. |
test_statslib_get_base_daily() X-Ref |
Test the function that calculates the start of the day. NOTE: I don't think this is the way this function should work. This test documents the current functionality. |
test_statslib_get_next_day_start() X-Ref |
Test the function that gets the start of the next day. |
test_statslib_get_base_weekly($startwday, $timezone, $timestart, $expected) X-Ref |
Test the function that calculates the start of the week. param: int $startwday Day in which the week starts (Sunday = 0) param: string $timezone Default timezone param: string $timestart Date and time for which the first day of the week will be obtained param: string $expected Expected date of the first day of the week |
test_statslib_get_action_names() X-Ref |
Test the function that gets the action names. Note: The function results depend on installed modules. The hard coded lists are the defaults for a new Moodle 2.3 install. |
test_statslib_temp_table_create_and_drop() X-Ref |
Test the temporary table creation and deletion. |
test_statslib_temp_table_fill() X-Ref |
Test the temporary table creation and deletion. |
test_statslib_temp_table_setup() X-Ref |
Test the temporary table creation and deletion. |
test_statslib_temp_table_clean() X-Ref |
Test the function that clean out the temporary tables. |
test_statslib_cron_daily($xmlfile) X-Ref |
Test the daily stats function. |
test_statslib_cron_daily_no_default_profile_id() X-Ref |
Test the daily stats function. |