diff --git a/lib/behat/classes/behat_config_manager.php b/lib/behat/classes/behat_config_manager.php index e0ec4d46d25..c277e13f0eb 100644 --- a/lib/behat/classes/behat_config_manager.php +++ b/lib/behat/classes/behat_config_manager.php @@ -124,6 +124,10 @@ class behat_config_manager { $stepsdefinitions = array(); foreach ($components as $componentname => $componentpath) { $componentpath = self::clean_path($componentpath); + + if (!file_exists($componentpath . self::get_behat_tests_path())) { + continue; + } $diriterator = new DirectoryIterator($componentpath . self::get_behat_tests_path()); $regite = new RegexIterator($diriterator, '|behat_.*\.php$|');