Skip to content

Commit

Permalink
Merge branch 'MDL-70917' of git://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Apr 26, 2021
2 parents d9a8245 + 069cfef commit 57604e3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions admin/tool/behat/cli/run.php
Expand Up @@ -45,7 +45,7 @@
array(
'stop-on-failure' => 0,
'verbose' => false,
'replace' => false,
'replace' => '',
'help' => false,
'tags' => '',
'profile' => '',
Expand All @@ -70,7 +70,7 @@
Behat utilities to run behat tests in parallel
Usage:
php run.php [--BEHAT_OPTION=\"value\"] [--feature=\"value\"] [--replace] [--fromrun=value --torun=value] [--help]
php run.php [--BEHAT_OPTION=\"value\"] [--feature=\"value\"] [--replace=\"{run}\"] [--fromrun=value --torun=value] [--help]
Options:
--BEHAT_OPTION Any combination of behat option specified in http://behat.readthedocs.org/en/v2.5/guides/6.cli.html
Expand Down Expand Up @@ -144,9 +144,10 @@
if ($options['profile']) {
$profile = $options['profile'];

// If profile passed is not set, then exit.
// If profile passed is not set, then exit (note we skip if the 'replace' option is found within the 'profile' value).
if (!isset($CFG->behat_config[$profile]) && !isset($CFG->behat_profiles[$profile]) &&
!(isset($options['replace']) && (strpos($options['profile'], $options['replace']) >= 0 ))) {
!($options['replace'] && (strpos($profile, (string) $options['replace']) !== false))) {

echo "Invalid profile passed: " . $profile . PHP_EOL;
exit(1);
}
Expand Down

0 comments on commit 57604e3

Please sign in to comment.