Skip to content

Commit

Permalink
MDL-79845 core: fix course navigation options test
Browse files Browse the repository at this point in the history
This now expects 10 navoptions, since ltix is always set.
  • Loading branch information
snake committed May 8, 2024
1 parent 0767259 commit 911d406
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion course/tests/externallib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2755,7 +2755,7 @@ public function test_get_user_navigation_options() {
foreach ($course['options'] as $option) {
$navoptions->{$option['name']} = $option['available'];
}
$this->assertCount(9, $course['options']);
$this->assertCount(10, $course['options']);
if ($course['id'] == SITEID) {
$this->assertTrue($navoptions->blogs);
$this->assertFalse($navoptions->notes);
Expand All @@ -2766,6 +2766,7 @@ public function test_get_user_navigation_options() {
$this->assertFalse($navoptions->search);
$this->assertTrue($navoptions->competencies);
$this->assertFalse($navoptions->communication);
$this->assertFalse($navoptions->ltix);
} else {
$this->assertTrue($navoptions->blogs);
$this->assertFalse($navoptions->notes);
Expand All @@ -2776,6 +2777,7 @@ public function test_get_user_navigation_options() {
$this->assertFalse($navoptions->search);
$this->assertTrue($navoptions->competencies);
$this->assertFalse($navoptions->communication);
$this->assertFalse($navoptions->ltix);
}
}
}
Expand Down

0 comments on commit 911d406

Please sign in to comment.