Issue #46 and #53 - Fixed failing tests on Moodle 27 and coding style issues. Fixed static page to reload only after the planned duration time.

This commit is contained in:
Daniel Thee Roperto
2016-09-28 10:50:40 +10:00
parent 58eeaccc75
commit e09ae44f2f
4 changed files with 9 additions and 5 deletions

View File

@@ -126,8 +126,8 @@ class behat_auth_outage extends behat_base {
$expected = ($action == 'Edit') ? 2 : 1; // Edit is an action through the title or button.
$found = $this->can_i_see_action($action);
if ($found != $expected) {
throw new ExpectationException('"'.$action.'" action not found, expected '.$expected
.' but found '.$found.'.', $this->getSession());
throw new ExpectationException('"'.$action.'" action not found, expected '.$expected.
' but found '.$found.'.', $this->getSession());
}
}

View File

@@ -92,7 +92,7 @@ class infopagecontroller_test extends advanced_testcase {
$html = $info->get_output();
// Must find...
self::assertContains('<!DOCTYPE html>', $html);
self::assertContains('<meta http-equiv="refresh" ', $html);
self::assertContains('<meta http-equiv="refresh" content="'.$outage->get_duration_planned().'">', $html); // Issue #53.
self::assertContains('</html>', $html);
self::assertContains($outage->get_title(), $html);
self::assertContains($outage->get_description(), $html);