Unit tests for lib/outputcomponents.php.
Copyright: | 2011 David Mudrak <david@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 248 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
icon_system_test:: (12 methods):
test_is_valid_subsystem()
test_invalid_instance()
test_valid_instance()
test_instance_singleton()
test_instance_singleton_named_default()
test_instance_singleton_named()
test_instance_singleton_named_child()
test_instance_singleton_reset()
icon_system_provider()
is_valid_subsystem_provider()
invalid_instance_provider()
valid_instance_provider()
Class: icon_system_test - X-Ref
Unit tests for the `icon_system` class.test_is_valid_subsystem(string $parent, string $system, bool $expected) X-Ref |
Check whether the supplied classes are valid icon subsystems of the supplied one. param: string $parent The class to call ::is_valid_system() on param: string $system The class to request param: bool $expected Whether the supplied relationship is valid |
test_invalid_instance(string $parent, string $system) X-Ref |
Ensure that the ::instance() function throws an appropriate Exception when an inappropriate relationship is specified. param: string $parent The class to call ::instance() on param: string $system The class to request |
test_valid_instance(string $parent, string $system) X-Ref |
Ensure that the ::instance() function returns an instance of the supplied system for a valid icon system relationship. param: string $parent The class to call ::instance() on param: string $system The class to request |
test_instance_singleton() X-Ref |
Ensure that subsequent calls without arguments to ::instance() return the exact same instance. |
test_instance_singleton_named_default() X-Ref |
Ensure thaat subsequent calls with an argument to ::instance() return the exact same instance. |
test_instance_singleton_named(string $parent, string $child) X-Ref |
Ensure that ::instance() returns an instance of the correct icon system when requested on the core icon_system class. param: string $parent The class to call ::instance() on param: string $child The class to request |
test_instance_singleton_named_child(string $parent, string $child) X-Ref |
Ensure that ::instance() returns an instance of the correct icon system when called on a named parent class. param: string $parent The class to call ::instance() on param: string $child The class to request |
test_instance_singleton_reset() X-Ref |
Ensure that the ::reset_caches() function resets the stored instance such that ::instance() returns a new instance in subsequent calls. |
icon_system_provider() X-Ref |
Returns data for data providers containing: - parent icon system - child icon system - whether it is a valid child return: array |
is_valid_subsystem_provider() X-Ref |
Data provider for tests of `is_valid`. return: array |
invalid_instance_provider() X-Ref |
Data provider for tests of `instance` containing only invalid tests. return: array |
valid_instance_provider() X-Ref |
No description |