Skip to content

Commit

Permalink
MDL-37046 behat: Basic web execution wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Jan 29, 2013
1 parent 301cbe3 commit dca22d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 8 additions & 4 deletions admin/tool/behat/index.php
Expand Up @@ -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();
12 changes: 10 additions & 2 deletions admin/tool/behat/lang/en/tool_behat.php
Expand Up @@ -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';

0 comments on commit dca22d7

Please sign in to comment.