MDL-39481 behat: Provide info about init.php

This commit is contained in:
David Monllao 2013-05-03 12:04:42 +08:00
parent 95190fda69
commit b32ca4caf9
3 changed files with 7 additions and 7 deletions

View File

@ -175,9 +175,9 @@ class behat_command {
return BEHAT_EXITCODE_COMPOSER;
}
// Checking behat dataroot existence otherwise echo about admin/tool/behat/cli/util.php.
// Checking behat dataroot existence otherwise echo about admin/tool/behat/cli/init.php.
if (empty($CFG->behat_dataroot) || !is_dir($CFG->behat_dataroot) || !is_writable($CFG->behat_dataroot)) {
self::output_msg(get_string('runclitool', 'tool_behat', 'php admin/tool/behat/cli/util.php'));
self::output_msg(get_string('runclitool', 'tool_behat', 'php admin/tool/behat/cli/init.php'));
return BEHAT_EXITCODE_CONFIG;
}

View File

@ -55,12 +55,12 @@ function behat_error($errorcode, $text = '') {
$text = 'Behat permissions problem: ' . $text . ', check the permissions';
break;
case BEHAT_EXITCODE_REINSTALL:
$path = testing_cli_argument_path('/admin/tool/behat/cli/util.php');
$text = "Reinstall Behat: ".$text.", use:\n php ".$path." --drop \n php ".$path." --install";
$path = testing_cli_argument_path('/admin/tool/behat/cli/init.php');
$text = "Reinstall Behat: ".$text.", use:\n php ".$path;
break;
case BEHAT_EXITCODE_INSTALL:
$path = testing_cli_argument_path('/admin/tool/behat/cli/util.php');
$text = "Install Behat before enabling it, use:\n php ".$path." --install";
$path = testing_cli_argument_path('/admin/tool/behat/cli/init.php');
$text = "Install Behat before enabling it, use:\n php ".$path;
break;
default:
$text = 'Unknown error ' . $errorcode . ' ' . $text;

View File

@ -92,7 +92,7 @@ class behat_hooks extends behat_base {
// Prevents using outdated data, upgrade script would start and tests would fail.
if (!behat_util::is_test_data_updated()) {
$commandpath = 'php admin/tool/behat/cli/util.php';
$commandpath = 'php admin/tool/behat/cli/init.php';
throw new Exception('Your behat test site is outdated, please run ' . $commandpath . ' from your moodle dirroot to drop and install the behat test site again.');
}
// Avoid parallel tests execution, it continues when the previous lock is released.