Skip to content

Commit

Permalink
Horizontal or vertical orientation does not matter when only section 0!
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Jul 18, 2020
1 parent ab10470 commit 0f72da0
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions tests/courseformatrenderer_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public function test_print_multiple_section_page_vertical() {
$this->expectOutputString($theoutput);
}

public function test_print_multiple_section_page_no_sections_horizontal() {
public function test_print_multiple_section_page_no_sections() {
global $CFG;
$activityicon = 'alt=" " role="presentation" ';
if ($CFG->version >= 2018120303.06) {
Expand Down Expand Up @@ -386,37 +386,6 @@ public function test_print_multiple_section_page_no_sections_horizontal() {
$this->expectOutputString($theoutput);
}

public function test_print_multiple_section_page_no_sections_vertical() {
global $CFG;
$activityicon = 'alt=" " role="presentation" ';
if ($CFG->version >= 2018120303.06) {
$activityicon = 'alt="" role="presentation" aria-hidden="true" ';
}

$this->init(0, 1);
$section0 = $this->courseformat->get_section(0);

self::call_method($this->outputus, 'print_multiple_section_page',
array($this->course, null, null, null, null, null));
$theoutput = '<h2 class="accesshide">Section</h2>';
$theoutput .= '<ul class="ctopics bsnewgrid">';
$theoutput .= '<li id="section-0" class="section main clearfix" role="region" ';
$theoutput .= 'aria-labelledby="sectionid-'.$section0->id.'-title" data-sectionid="0" data-sectionreturnid="0">';
$theoutput .= '<div class="left side"></div>';
$theoutput .= '<div class="content">';
$theoutput .= '<h3 id="sectionid-'.$section0->id.'-title" class="accesshide">General</h3>';
$theoutput .= '<div class="section_availability"></div><div class="summary"></div><ul class="section img-text">';
$theoutput .= '<li class="activity forum modtype_forum " id="module-'.$this->cmid.'"><div><div class="mod-indent-outer">';
$theoutput .= '<div class="mod-indent"></div><div><div class="activityinstance">';
$theoutput .= '<a class="aalink" onclick="" href="https://www.example.com/moodle/mod/forum/view.php?id='.$this->cmid.'">';
$theoutput .= '<img src="https://www.example.com/moodle/theme/image.php/_s/boost/forum/1/icon" class="iconlarge activityicon" '.$activityicon.'/>';
$theoutput .= '<span class="instancename">Announcements<span class="accesshide " > Forum</span></span></a></div></div></div></div></li></ul></div>';
$theoutput .= '<div class="right side"></div>';
$theoutput .= '</li>';
$theoutput .= '</ul>';
$this->expectOutputString($theoutput);
}

public function test_toggle_all() {
global $CFG;
$ariahidden = '';
Expand Down

0 comments on commit 0f72da0

Please sign in to comment.