Skip to content

Commit

Permalink
Merge branch 'MDL-78036' of https://github.com/stronk7/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jun 8, 2023
2 parents 11a075e + 10e3afc commit 78c71f4
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion admin/tool/behat/cli/init.php
Expand Up @@ -102,7 +102,7 @@
Example from Moodle root directory:
\$ php admin/tool/behat/cli/init.php --parallel=2
More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
More info in https://moodledev.io/general/development/tools/behat/running
";

if (!empty($options['help'])) {
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/behat/cli/run.php
Expand Up @@ -87,7 +87,7 @@
Example from Moodle root directory:
\$ php admin/tool/behat/cli/run.php --tags=\"@javascript\"
More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
More info in https://moodledev.io/general/development/tools/behat/running
";

if (!empty($options['help'])) {
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/behat/cli/util.php
Expand Up @@ -94,7 +94,7 @@
Example from Moodle root directory:
\$ php admin/tool/behat/cli/util.php --enable --parallel=4
More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
More info in https://moodledev.io/general/development/tools/behat/running
";

if (!empty($options['help'])) {
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/behat/cli/util_single_run.php
Expand Up @@ -89,7 +89,7 @@
Example from Moodle root directory:
\$ php admin/tool/behat/cli/util_single_run.php --enable
More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
More info in https://moodledev.io/general/development/tools/behat/running
";

if (!empty($options['help'])) {
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/behat/lang/en/tool_behat.php
Expand Up @@ -30,7 +30,7 @@
$string['errorsetconfig'] = '$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot need to be set in config.php.';
$string['erroruniqueconfig'] = '$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot values need to be different than $CFG->dataroot, $CFG->prefix, $CFG->wwwroot, $CFG->phpunit_dataroot and $CFG->phpunit_prefix values.<br/>Or, if $CFG->behat_prefix is the same, $CFG->behat_dbname or $CFG->behat_dbhost need to be different from $CFG->phpunit_dbname and $CFG->phpunit_dbhost and from $CFG->dbname and $CFG->dbhost.';
$string['fieldvalueargument'] = 'Field value arguments';
$string['fieldvalueargument_help'] = 'This argument should be completed by a field value. There are many field types, including simple ones like checkboxes, selects or textareas, or complex ones like date selectors. See the dev documentation <a href="https://docs.moodle.org/dev/Acceptance_testing" target="_blank">Acceptance_testing</a> for details of expected field values.';
$string['fieldvalueargument_help'] = 'This argument should be completed by a field value. There are many field types, including simple ones like checkboxes, selects or textareas, or complex ones like date selectors. See the dev documentation <a href="https://moodledev.io/general/development/tools/behat" target="_blank">Acceptance_testing</a> for details of expected field values.';
$string['giveninfo'] = 'Given. Processes to set up the environment';
$string['infoheading'] = 'Info';
$string['installinfo'] = 'Read {$a} for installation and tests execution info';
Expand Down
5 changes: 3 additions & 2 deletions admin/tool/behat/renderer.php
Expand Up @@ -184,9 +184,10 @@ public function generic_info() {
// Info.
$installurl = behat_command::DOCS_URL;
$installlink = html_writer::tag('a', $installurl, array('href' => $installurl, 'target' => '_blank'));
$writetestsurl = 'https://docs.moodle.org/dev/Writing acceptance tests';
$writetestsurl = 'https://moodledev.io/general/development/tools/behat/writing';
$writetestslink = html_writer::tag('a', $writetestsurl, array('href' => $writetestsurl, 'target' => '_blank'));
$writestepsurl = 'https://docs.moodle.org/dev/Writing_new_acceptance_test_step_definitions';
$writestepsurl = 'https://moodledev.io/general/development/tools/behat/writing#' .
'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),
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/behat/version.php
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2023042400; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2023060600; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2023041800; // Requires this Moodle version.
$plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
2 changes: 1 addition & 1 deletion lib/behat/classes/behat_command.php
Expand Up @@ -40,7 +40,7 @@ class behat_command {
/**
* Docs url
*/
const DOCS_URL = 'https://docs.moodle.org/dev/Running_acceptance_test';
const DOCS_URL = 'https://moodledev.io/general/development/tools/behat';

/**
* Ensures the behat dir exists in moodledata
Expand Down
Expand Up @@ -60,7 +60,7 @@ public function printDefinitions(Suite $suite, $definitions) {
$search = $this->searchcriterion;

// If there is a specific type (given, when or then) required.
if (strpos($search, '&&') !== false) {
if ($search && strpos($search, '&&') !== false) {
list($search, $type) = explode('&&', $search);
}

Expand Down

0 comments on commit 78c71f4

Please sign in to comment.