diff --git a/admin/tool/behat/lang/en/tool_behat.php b/admin/tool/behat/lang/en/tool_behat.php index 353d1b5b8d8e9..abe5b87242be6 100644 --- a/admin/tool/behat/lang/en/tool_behat.php +++ b/admin/tool/behat/lang/en/tool_behat.php @@ -24,10 +24,10 @@ $string['allavailablesteps'] = 'All the available steps definitions'; $string['giveninfo'] = 'Given. Processes to set up the environment'; -$string['installinfo'] = 'for installation and tests execution info'; +$string['installinfo'] = 'Read {$a} for installation and tests execution info'; $string['moreinfoin'] = 'More info in'; -$string['newstepsinfo'] = 'for info about how to add new steps definitions'; -$string['newtestsinfo'] = 'for info about how to write new tests'; +$string['newstepsinfo'] = 'Read {$a} for info about how to add new steps definitions'; +$string['newtestsinfo'] = 'Read {$a} for info about how to write new tests'; $string['nostepsdefinitions'] = 'There aren\'t steps definitions matching this filters'; $string['pluginname'] = 'Acceptance testing'; $string['phpunitenvproblem'] = 'PHPUnit environment problem'; diff --git a/admin/tool/behat/locallib.php b/admin/tool/behat/locallib.php index 96ea9e4a47668..a3b8aa1f82841 100644 --- a/admin/tool/behat/locallib.php +++ b/admin/tool/behat/locallib.php @@ -298,11 +298,11 @@ public static function is_server_running() { /** * Cleans the path returned by get_components_with_tests() to standarize it * - * {@see tests_finder::get_all_directories_with_tests()} it returns the path including /tests/ + * @see tests_finder::get_all_directories_with_tests() it returns the path including /tests/ * @param string $path * @return string The string without the last /tests part */ - protected static function clean_path($path) { + protected final static function clean_path($path) { $path = rtrim($path, DIRECTORY_SEPARATOR); @@ -433,8 +433,9 @@ protected static function stop_test_mode() { * Checks whether test environment is enabled or disabled * * To check is the current script is running in the test - * environment {@see tool_behat::is_test_environment_running()} + * environment * + * @see tool_behat::is_test_environment_running() * @return bool */ public static function is_test_mode_enabled() { @@ -481,7 +482,7 @@ public static function are_behat_dependencies_installed() { * * @return string */ - protected static function get_test_filepath() { + protected final static function get_test_filepath() { global $CFG; if (self::is_test_environment_running()) { @@ -499,7 +500,7 @@ protected static function get_test_filepath() { * * @return string */ - protected static function get_behat_tests_path() { + protected final static function get_behat_tests_path() { return DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'behat'; } @@ -530,7 +531,7 @@ protected static function get_behat_dir() { * Returns the executable path * @return string */ - protected static function get_behat_command() { + protected final static function get_behat_command() { return 'vendor' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'behat'; } diff --git a/admin/tool/behat/renderer.php b/admin/tool/behat/renderer.php index 5bd98c02f2520..e1cfc37bb3554 100644 --- a/admin/tool/behat/renderer.php +++ b/admin/tool/behat/renderer.php @@ -56,9 +56,9 @@ public function render_stepsdefinitions($stepsdefinitions, $form) { $writestepsurl = tool_behat::$docsurl . '#Adding_steps_definitions'; $writestepslink = html_writer::tag('a', $writestepsurl, array('href' => $writestepsurl, 'target' => '_blank')); $infos = array( - 'Read ' . $installlink . ' ' . get_string('installinfo', 'tool_behat'), - 'Read ' . $writetestslink . ' ' . get_string('newtestsinfo', 'tool_behat'), - 'Read ' . $writestepslink . ' ' . get_string('newstepsinfo', 'tool_behat') + get_string('installinfo', 'tool_behat', $installlink), + get_string('newtestsinfo', 'tool_behat', $writetestslink), + get_string('newstepsinfo', 'tool_behat', $writestepslink) ); $html .= $this->output->box_start(); $html .= html_writer::tag('h1', 'Info'); diff --git a/admin/tool/behat/tests/tool_behat_test.php b/admin/tool/behat/tests/tool_behat_test.php index 2e6324bd843a6..61ae73b8af192 100644 --- a/admin/tool/behat/tests/tool_behat_test.php +++ b/admin/tool/behat/tests/tool_behat_test.php @@ -29,6 +29,10 @@ /** * Allows access to internal methods without exposing them + * + * @package tool_behat + * @copyright 2012 David Monllaó + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class testable_tool_behat extends tool_behat { @@ -58,6 +62,10 @@ public static function get_config_file_contents($prefix, $features, $stepsdefini /** * Tool behat tests + * + * @package tool_behat + * @copyright 2012 David Monllaó + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class tool_behat_testcase extends advanced_testcase { diff --git a/lib/behat/features/bootstrap/behat_init_context.php b/lib/behat/features/bootstrap/behat_init_context.php index e8649a248d5c5..c1830b6e423f0 100644 --- a/lib/behat/features/bootstrap/behat_init_context.php +++ b/lib/behat/features/bootstrap/behat_init_context.php @@ -17,8 +17,7 @@ /** * Contexts initializer class * - * @package core - * @category behat + * @package tool_behat * @copyright 2012 David Monllaó * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -35,8 +34,7 @@ * Renamed from behat FeatureContext class according * to Moodle coding styles conventions * - * @package core - * @category behat + * @package tool_behat * @copyright 2012 David Monllaó * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/lib/setup.php b/lib/setup.php index 279d0add6ee60..2c19eda1332c3 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -94,8 +94,8 @@ if (isset($CFG->behat_switchcompletely)) { $CFG->behat_wwwroot = $CFG->wwwroot; -// Default URL for acceptance testing, only accessible from localhost. } else if (!isset($CFG->behat_wwwroot)) { + // Default URL for acceptance testing, only accessible from localhost. $CFG->behat_wwwroot = 'http://localhost:8000'; }