From 7abeaf37eaca57c3b95687fe5a1546bfe01e2ecd Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Wed, 26 Apr 2023 11:55:47 +0200 Subject: [PATCH] MDL-78036 behat: Move all links from old docs to new counterparts --- admin/tool/behat/cli/init.php | 2 +- admin/tool/behat/cli/run.php | 2 +- admin/tool/behat/cli/util.php | 2 +- admin/tool/behat/cli/util_single_run.php | 2 +- admin/tool/behat/lang/en/tool_behat.php | 2 +- admin/tool/behat/renderer.php | 5 +++-- admin/tool/behat/version.php | 2 +- lib/behat/classes/behat_command.php | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/admin/tool/behat/cli/init.php b/admin/tool/behat/cli/init.php index b423cebc68b..86ea2dea02e 100644 --- a/admin/tool/behat/cli/init.php +++ b/admin/tool/behat/cli/init.php @@ -102,7 +102,7 @@ Options: 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'])) { diff --git a/admin/tool/behat/cli/run.php b/admin/tool/behat/cli/run.php index 454299e7612..cfcaedd96d2 100644 --- a/admin/tool/behat/cli/run.php +++ b/admin/tool/behat/cli/run.php @@ -87,7 +87,7 @@ Options: 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'])) { diff --git a/admin/tool/behat/cli/util.php b/admin/tool/behat/cli/util.php index 61247ab0e8f..ddff4919299 100644 --- a/admin/tool/behat/cli/util.php +++ b/admin/tool/behat/cli/util.php @@ -94,7 +94,7 @@ Options: 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'])) { diff --git a/admin/tool/behat/cli/util_single_run.php b/admin/tool/behat/cli/util_single_run.php index 1b82f625b20..29843d086f0 100644 --- a/admin/tool/behat/cli/util_single_run.php +++ b/admin/tool/behat/cli/util_single_run.php @@ -89,7 +89,7 @@ Options: 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'])) { diff --git a/admin/tool/behat/lang/en/tool_behat.php b/admin/tool/behat/lang/en/tool_behat.php index 92e63da7919..08d9e2f9cf2 100644 --- a/admin/tool/behat/lang/en/tool_behat.php +++ b/admin/tool/behat/lang/en/tool_behat.php @@ -30,7 +30,7 @@ $string['errordataroot'] = '$CFG->behat_dataroot is not set or is invalid.'; $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.
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 Acceptance_testing 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 Acceptance_testing 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'; diff --git a/admin/tool/behat/renderer.php b/admin/tool/behat/renderer.php index db85f0f063e..e3462ca3e1b 100644 --- a/admin/tool/behat/renderer.php +++ b/admin/tool/behat/renderer.php @@ -184,9 +184,10 @@ class tool_behat_renderer extends plugin_renderer_base { // 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), diff --git a/admin/tool/behat/version.php b/admin/tool/behat/version.php index 3ac40fe3c7d..1df8f7cc960 100644 --- a/admin/tool/behat/version.php +++ b/admin/tool/behat/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2022112801; // The current plugin version (Date: YYYYMMDDXX). +$plugin->version = 2022112802; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2022111800; // Requires this Moodle version. $plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics) diff --git a/lib/behat/classes/behat_command.php b/lib/behat/classes/behat_command.php index ea0db3c86ef..29f2427e7c5 100644 --- a/lib/behat/classes/behat_command.php +++ b/lib/behat/classes/behat_command.php @@ -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