MDL-37046 behat: Basic web execution wrapper

This commit is contained in:
David Monllao
2013-01-29 08:40:35 +08:00
parent 301cbe3a30
commit dca22d7cc1
2 changed files with 18 additions and 6 deletions
+8 -4
View File
@@ -24,12 +24,16 @@
require(__DIR__ . '/../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/behat/locallib.php');
$action = optional_param('action', 'info', PARAM_ALPHAEXT);
admin_externalpage_setup('toolbehat');
$title = get_string('pluginname', 'tool_behat') . ' - ' . get_string('command' . $action, 'tool_behat');
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('pluginname', 'tool_behat'));
echo $OUTPUT->box_start();
echo get_string('installationinfo', 'tool_behat');
echo $OUTPUT->box_end();
echo $OUTPUT->heading($title);
call_user_func('tool_behat::' . $action);
echo $OUTPUT->footer();
+10 -2
View File
@@ -22,5 +22,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['pluginname'] = 'Behat';
$string['installationinfo'] = '';
$string['actionnotsupported'] = 'Action not supported';
$string['commandbuildconfigfile'] = 'Build config file';
$string['commandinfo'] = 'Info';
$string['commandruntests'] = 'Run tests';
$string['commandstepsdefinitions'] = 'Steps definitions list';
$string['finished'] = 'Process finished';
$string['nobehatpath'] = 'You must specify the path to moodle-acceptance-tests.';
$string['nostepsdefinitions'] = 'There aren\'t steps definitions matching this filter';
$string['pluginname'] = 'Acceptance test tool';
$string['wrongbehatsetup'] = 'Something is wrong with the setup, check moodle-acceptance-tests runs well on CLI and check your \'behatpath\' setting value is pointing to the right directory';