Search moodle.org's
Developer Documentation


/ -> mdeploytest.php (summary)

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

Defines 4 classes


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 subclass

move_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 utility

test_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

Search This Site: