From a8d910a82a45d43d6e1bc6df604bcf996d6d0adc Mon Sep 17 00:00:00 2001 From: David Monllao Date: Thu, 28 Feb 2013 15:57:49 +0800 Subject: [PATCH] MDL-38184 behat: Solving problem with the tests loader --- lib/behat/classes/behat_config_manager.php | 4 ++++ 1 file changed, 4 insertions(+) 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$|');