Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]
Tests for cache.
Copyright: | 2016 Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 358 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file admin/tool/usertours/tests/helper_trait.php |
cache_testcase:: (13 methods):
test_get_enabled_tourdata_disabled()
test_get_enabled_tourdata_enabled_no_steps()
test_get_enabled_tourdata_enabled()
test_get_enabled_tourdata_enabled_sortorder()
test_get_enabled_tourdata_single_fetch()
get_matching_tourdata_provider()
test_get_matching_tourdata()
test_notify_tour_change()
test_get_stepdata_no_steps()
test_get_stepdata_correct_tour()
test_get_stepdata_ordered_steps()
test_get_stepdata_single_fetch()
test_notify_step_change()
Class: cache_testcase - X-Ref
Tests for cache.test_get_enabled_tourdata_disabled() X-Ref |
Test that get_enabled_tourdata does not return disabled tours. |
test_get_enabled_tourdata_enabled_no_steps() X-Ref |
Test that get_enabled_tourdata does not return an enabled but empty tour. |
test_get_enabled_tourdata_enabled() X-Ref |
Test that get_enabled_tourdata returns a tour with steps. |
test_get_enabled_tourdata_enabled_sortorder() X-Ref |
Test that get_enabled_tourdata returns tours in the correct sortorder |
test_get_enabled_tourdata_single_fetch() X-Ref |
Test that caching prevents additional DB reads. |
get_matching_tourdata_provider() X-Ref |
Data provider for get_matching_tourdata. return: array |
test_get_matching_tourdata($tourconfigs, $targetmatch, $expected) X-Ref |
Tests for the get_matching_tourdata function. param: array $tourconfigs The configuration for the tours to create param: string $targetmatch The match to be tested param: array $expected An array containing the ordered names of the expected tours |
test_notify_tour_change() X-Ref |
Test that notify_tour_change clears the cache. |
test_get_stepdata_no_steps() X-Ref |
Test that get_stepdata returns an empty array when no steps were found. |
test_get_stepdata_correct_tour() X-Ref |
Test that get_stepdata returns an empty array when no steps were found. |
test_get_stepdata_ordered_steps() X-Ref |
Test that get_stepdata returns an array containing multiple steps in the same order. This is very difficult to determine because the act of changing the order will likely change the DB natural sorting. |
test_get_stepdata_single_fetch() X-Ref |
Test that caching prevents additional DB reads. |
test_notify_step_change() X-Ref |
Test that notify_step_change clears the cache. |