PHPUnit tests for the mdeploy.php utility Because the mdeploy.php can't be part of the Moodle code itself, this tests must be executed using something like:
Copyright: | 2012 David Mudrak <david@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 370 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file mdeploy.php |
input_fake_provider:: (2 methods):
set_fake_options()
parse_raw_options()
testable_input_manager:: (2 methods):
cast_value()
initialize()
testable_worker:: (4 methods):
move_directory()
remove_directory()
create_directory_precheck()
get_env()
mdeploytest:: (20 methods):
test_same_singletons()
test_cast_value()
data_for_cast_value()
test_input_type_path_multiple_colons()
test_input_type_path_invalid_drive_label()
test_input_type_path_invalid_colon()
test_cast_array_argument()
test_cast_object_argument()
test_cast_invalid_url_value()
test_cast_invalid_md5_value()
test_cast_tilde_in_path()
test_has_option()
test_get_option()
test_moving_and_removing_directories()
test_create_directory_precheck()
test_get_env_unlisted()
get_env_unlisted_provider()
test_get_env_unset()
test_get_env_valid()
get_env_valid_provider()
Class: input_fake_provider - X-Ref
Provides testable input options.set_fake_options(array $options) X-Ref |
Sets fake raw options. param: array $options |
parse_raw_options() X-Ref |
Returns the explicitly set fake options. return: array |
Class: testable_input_manager - X-Ref
Testable subclass.cast_value($raw, $type) X-Ref |
Provides access to the protected method so we can test it explicitly. |
initialize() X-Ref |
Sets the fake input provider. |
Class: testable_worker - X-Ref
Testable subclassmove_directory($source, $target, $keepsourceroot = false) X-Ref |
Provides access to the protected method. |
remove_directory($path, $keeppathroot = false) X-Ref |
Provides access to the protected method. |
create_directory_precheck($path) X-Ref |
Provides access to the protected method. |
get_env($key) X-Ref |
No description |
Class: mdeploytest - X-Ref
Test cases for the mdeploy utilitytest_same_singletons() X-Ref |
No description |
test_cast_value($raw, $type, $result) X-Ref |
data_for_cast_value() X-Ref |
No description |
test_input_type_path_multiple_colons() X-Ref |
test_input_type_path_invalid_drive_label() X-Ref |
test_input_type_path_invalid_colon() X-Ref |
test_cast_array_argument() X-Ref |
test_cast_object_argument() X-Ref |
test_cast_invalid_url_value() X-Ref |
test_cast_invalid_md5_value() X-Ref |
test_cast_tilde_in_path() X-Ref |
test_has_option() X-Ref |
No description |
test_get_option() X-Ref |
No description |
test_moving_and_removing_directories() X-Ref |
No description |
test_create_directory_precheck() X-Ref |
No description |
test_get_env_unlisted($key) X-Ref |
Test that an invalid setting throws an exception. |
get_env_unlisted_provider() X-Ref |
No description |
test_get_env_unset($key) X-Ref |
Test that a valid, but unset setting throws an exception. |
test_get_env_valid($key) X-Ref |
Test that a valid setting with data returns that data. |
get_env_valid_provider() X-Ref |
No description |