#129 Added Behat test coverage

This commit is contained in:
Mark Nelson 2017-08-09 19:05:57 +08:00
parent efd5b7107c
commit fa69bcc604
13 changed files with 741 additions and 4 deletions

View file

@ -134,6 +134,11 @@ if (empty($action)) {
$completion = new completion_info($course);
$completion->set_module_viewed($cm);
// Hack alert - don't initiate the download when running Behat.
if (defined('BEHAT_SITE_RUNNING')) {
redirect(new moodle_url('/mod/customcert/view.php', array('id' => $cm->id)));
}
// Now we want to generate the PDF.
$template = new \mod_customcert\template($template);
$template->generate_pdf();