Skip to content

Commit

Permalink
masonry renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
ewallah committed Apr 1, 2021
1 parent 01d258e commit 83a82dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/format_masonry_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,14 @@ public function test_format() {
$format = course_get_format($this->course);
$this->assertEquals('masonry', $format->get_format());
$this->setAdminUser();
$PAGE->get_renderer('core', 'course');
$PAGE->set_context(\context_course::instance($this->course->id));
$PAGE->set_course($this->course);
$PAGE->get_renderer('format_masonry');
// Mimick course variable.
$course = $this->course;
ob_start();
include_once($CFG->dirroot . '/course/format/masonry/format.php');
ob_end_clean();
$this->assertEquals($course, $PAGE->course);
}

/**
Expand All @@ -216,8 +218,8 @@ public function test_format_editing() {
$this->assertEquals('masonry', $format->get_format());
$this->setAdminUser();
$USER->editing = true;
$PAGE->get_renderer('core', 'course');
$PAGE->set_context(\context_course::instance($this->course->id));
$PAGE->set_course($this->course);
$PAGE->get_renderer('format_masonry');
sesskey();
$_POST['marker'] = 2;
ob_start();
Expand Down

0 comments on commit 83a82dd

Please sign in to comment.