mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-60418' of git://github.com/timhunt/moodle
This commit is contained in:
commit
c080369cb9
@ -162,11 +162,10 @@ class tool_behat_renderer extends plugin_renderer_base {
|
||||
$html .= $this->output->heading($title);
|
||||
|
||||
// Info.
|
||||
$installurl = behat_command::DOCS_URL . '#Installation';
|
||||
$installlink = html_writer::tag('a', $installurl, array('href' => $installurl, 'target' => '_blank'));
|
||||
$writetestsurl = behat_command::DOCS_URL . '#Writing_features';
|
||||
$installlink = html_writer::tag('a', $installurl, array('href' => behat_command::DOCS_URL, 'target' => '_blank'));
|
||||
$writetestsurl = 'https://docs.moodle.org/dev/Writing acceptance tests';
|
||||
$writetestslink = html_writer::tag('a', $writetestsurl, array('href' => $writetestsurl, 'target' => '_blank'));
|
||||
$writestepsurl = behat_command::DOCS_URL . '#Adding_steps_definitions';
|
||||
$writestepsurl = 'https://docs.moodle.org/dev/Writing_new_acceptance_test_step_definitions';
|
||||
$writestepslink = html_writer::tag('a', $writestepsurl, array('href' => $writestepsurl, 'target' => '_blank'));
|
||||
$infos = array(
|
||||
get_string('installinfo', 'tool_behat', $installlink),
|
||||
|
@ -40,7 +40,7 @@ class behat_command {
|
||||
/**
|
||||
* Docs url
|
||||
*/
|
||||
const DOCS_URL = 'http://docs.moodle.org/dev/Acceptance_testing';
|
||||
const DOCS_URL = 'https://docs.moodle.org/dev/Running_acceptance_test';
|
||||
|
||||
/**
|
||||
* Ensures the behat dir exists in moodledata
|
||||
@ -265,7 +265,7 @@ class behat_command {
|
||||
// We continue execution after this.
|
||||
$clibehaterrorstr = "Ensure you set \$CFG->behat_* vars in config.php " .
|
||||
"and you ran admin/tool/behat/cli/init.php.\n" .
|
||||
"More info in " . self::DOCS_URL . "#Installation\n\n";
|
||||
"More info in " . self::DOCS_URL;
|
||||
|
||||
echo 'Error: ' . $msg . "\n\n" . $clibehaterrorstr;
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ class behat_util extends testing_util {
|
||||
|
||||
behat_error (BEHAT_EXITCODE_REQUIREMENT, $CFG->behat_wwwroot . ' is not available, ensure you specified ' .
|
||||
'correct url and that the server is set up and started.' . PHP_EOL . ' More info in ' .
|
||||
behat_command::DOCS_URL . '#Running_tests' . PHP_EOL);
|
||||
behat_command::DOCS_URL . PHP_EOL);
|
||||
}
|
||||
|
||||
// Check if cli version is same as web version.
|
||||
|
@ -211,7 +211,10 @@ class behat_data_generators extends behat_base {
|
||||
);
|
||||
|
||||
/**
|
||||
* Creates the specified element. More info about available elements in http://docs.moodle.org/dev/Acceptance_testing#Fixtures.
|
||||
* Creates the specified element.
|
||||
*
|
||||
* The most reliable list of what types of thing can be created is the
|
||||
* $elements array defined above.
|
||||
*
|
||||
* @Given /^the following "(?P<element_string>(?:[^"]|\\")*)" exist:$/
|
||||
*
|
||||
|
@ -71,7 +71,7 @@ class behat_forms extends behat_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills a form with field/value data. More info in http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps.
|
||||
* Fills a form with field/value data.
|
||||
*
|
||||
* @Given /^I set the following fields to these values:$/
|
||||
* @throws ElementNotFoundException Thrown by behat_base::find
|
||||
@ -253,7 +253,7 @@ class behat_forms extends behat_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks, the field matches the value. More info in http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps.
|
||||
* Checks, the field matches the value.
|
||||
*
|
||||
* @Then /^the field "(?P<field_string>(?:[^"]|\\")*)" matches value "(?P<field_value_string>(?:[^"]|\\")*)"$/
|
||||
* @throws ElementNotFoundException Thrown by behat_base::find
|
||||
@ -277,7 +277,7 @@ class behat_forms extends behat_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks, the field does not match the value. More info in http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps.
|
||||
* Checks, the field does not match the value.
|
||||
*
|
||||
* @Then /^the field "(?P<field_string>(?:[^"]|\\")*)" does not match value "(?P<field_value_string>(?:[^"]|\\")*)"$/
|
||||
* @throws ExpectationException
|
||||
@ -352,7 +352,7 @@ class behat_forms extends behat_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks, the provided field/value matches. More info in http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps.
|
||||
* Checks, the provided field/value matches.
|
||||
*
|
||||
* @Then /^the following fields match these values:$/
|
||||
* @throws ExpectationException
|
||||
@ -372,7 +372,7 @@ class behat_forms extends behat_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the provided field/value pairs don't match. More info in http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps.
|
||||
* Checks that the provided field/value pairs don't match.
|
||||
*
|
||||
* @Then /^the following fields do not match these values:$/
|
||||
* @throws ExpectationException
|
||||
|
@ -1280,7 +1280,6 @@ class behat_general extends behat_base {
|
||||
|
||||
/**
|
||||
* Checks that the provided value exist in table.
|
||||
* More info in http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps.
|
||||
*
|
||||
* First row may contain column headers or numeric indexes of the columns
|
||||
* (syntax -1- is also considered to be column index). Column indexes are
|
||||
@ -1309,8 +1308,7 @@ class behat_general extends behat_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the provided value exist in table.
|
||||
* More info in http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps.
|
||||
* Checks that the provided values do not exist in a table.
|
||||
*
|
||||
* @Then /^the following should not exist in the "(?P<table_string>[^"]*)" table:$/
|
||||
* @throws ExpectationException
|
||||
|
@ -176,7 +176,7 @@ class behat_hooks extends behat_base {
|
||||
|
||||
if (!behat_util::is_test_mode_enabled()) {
|
||||
throw new behat_stop_exception('Behat only can run if test mode is enabled. More info in ' .
|
||||
behat_command::DOCS_URL . '#Running_tests');
|
||||
behat_command::DOCS_URL);
|
||||
}
|
||||
|
||||
// Reset all data, before checking for check_server_status.
|
||||
@ -303,7 +303,7 @@ class behat_hooks extends behat_base {
|
||||
throw new behat_stop_exception('Behat only can modify the test database and the test dataroot!');
|
||||
}
|
||||
|
||||
$moreinfo = 'More info in ' . behat_command::DOCS_URL . '#Running_tests';
|
||||
$moreinfo = 'More info in ' . behat_command::DOCS_URL;
|
||||
$driverexceptionmsg = 'Selenium server is not running, you need to start it to run tests that involve Javascript. ' . $moreinfo;
|
||||
try {
|
||||
$session = $this->getSession();
|
||||
|
Loading…
x
Reference in New Issue
Block a user