MDL-43087 testing: ability to load features from additional paths

This commit is contained in:
Aaron Barnes 2013-11-27 21:22:12 +13:00
parent 9b37cd72a2
commit ddb0a1b0e5
2 changed files with 10 additions and 0 deletions

View File

@ -661,6 +661,11 @@ $CFG->admin = 'admin';
// Example:
// $CFG->behat_extraallowedsettings = array('logsql', 'dblogerror');
//
// Including feature files from directories outside the dirroot is possible if required. The setting
// requires that the running user has executable permissions on all parent directories in the paths.
// Example:
// $CFG->behat_additionalfeatures = array('/home/developer/code/wipfeatures');
//
//=========================================================================
// 12. DEVELOPER DATA GENERATOR
//=========================================================================

View File

@ -82,6 +82,11 @@ class behat_config_manager {
$features = array_values($featurespaths);
}
// Optionally include features from additional directories.
if (!empty($CFG->behat_additionalfeatures)) {
$features = array_merge($features, array_map("realpath", $CFG->behat_additionalfeatures));
}
// Gets all the components with steps definitions.
$stepsdefinitions = array();
$steps = self::get_components_steps_definitions();