Skip to content

Commit

Permalink
MDL-58428 renderer: Correct paths & xpaths
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate-lightning authored and sarjona committed Feb 26, 2019
1 parent 847b0fa commit f38a9ca
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 486 deletions.
4 changes: 2 additions & 2 deletions enrol/self/tests/self_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ public function test_can_self_enrol() {
$selfplugin->enrol_user($instance1, $user2->id, $editingteacherrole->id);

$this->setUser($guest);
$noaccesshtml = get_string('noguestaccess', 'enrol') . $OUTPUT->continue_button(get_login_url());
$this->assertSame($noaccesshtml, $selfplugin->can_self_enrol($instance1, true));
$this->assertContains(get_string('noguestaccess', 'enrol'),
$selfplugin->can_self_enrol($instance1, true));

$this->setUser($user1);
$this->assertTrue($selfplugin->can_self_enrol($instance1, true));
Expand Down
6 changes: 1 addition & 5 deletions grade/tests/importlib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,11 @@ public function test_grade_import_commit() {
'itemid' => $gradeitem->id
));

$url = $CFG->wwwroot . '/grade/index.php';
$expectedresponse = "++ Grade import success ++
<div class=\"continuebutton\"><form method=\"get\" action=\"$url\"><div><input type=\"submit\" value=\"Continue\" /><input type=\"hidden\" name=\"id\" value=\"$course->id\" /></div></form></div>";

ob_start();
$status = grade_import_commit($course->id, $importcode);
$output = ob_get_contents();
ob_end_clean();
$this->assertTrue($status);
$this->assertEquals($expectedresponse, $output);
$this->assertContains("++ Grade import success ++", $output);
}
}
Loading

0 comments on commit f38a9ca

Please sign in to comment.