[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Source view] [Print] [Project Stats]
Utils to set Behat config
Copyright: | 2012 David Monllaó |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 312 lines (11 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 3 files lib/behat/classes/behat_command.php lib/testing/classes/tests_finder.php lib/behat/lib.php |
behat_config_manager:: (8 methods):
update_config_file()
get_components_steps_definitions()
get_steps_list_config_filepath()
get_behat_cli_config_filepath()
get_config_file_contents()
merge_config()
clean_path()
get_behat_tests_path()
Class: behat_config_manager - X-Ref
Behat configuration managerupdate_config_file($component = '', $testsrunner = true) X-Ref |
Updates a config file The tests runner and the steps definitions list uses different config files to avoid problems with concurrent executions. The steps definitions list can be filtered by component so it's behat.yml is different from the $CFG->dirroot one. param: string $component Restricts the obtained steps definitions to the specified component param: string $testsrunner If the config file will be used to run tests return: void |
get_components_steps_definitions() X-Ref |
Gets the list of Moodle steps definitions Class name as a key and the filepath as value Externalized from update_config_file() to use it from the steps definitions web interface return: array |
get_steps_list_config_filepath() X-Ref |
Returns the behat config file path used by the steps definition list return: string |
get_behat_cli_config_filepath() X-Ref |
Returns the behat config file path used by the behat cli command. return: string |
get_config_file_contents($features, $stepsdefinitions) X-Ref |
Behat config file specifing the main context class, the required Behat extensions and Moodle test wwwroot. param: array $features The system feature files param: array $stepsdefinitions The system steps definitions return: string |
merge_config($config, $localconfig) X-Ref |
Overrides default config with local config values array_merge does not merge completely the array's values param: mixed $config The node of the default config param: mixed $localconfig The node of the local config return: mixed The merge result |
clean_path($path) X-Ref |
Cleans the path returned by get_components_with_tests() to standarize it param: string $path return: string The string without the last /tests part |
get_behat_tests_path() X-Ref |
The relative path where components stores their behat tests return: string |
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |