Modified - changed the type of return in the second condition because return a value int instead of boolean

skala
Ricardo Rodriguez 15 years ago
parent 8206ed31f5
commit cf38f31bfe
  1. 7
      tests/main/inc/lib/main_api.lib.test.php

@ -330,7 +330,12 @@ class TestMainApi extends UnitTestCase {
function testApiIsCourseAdminIsFalseWhenNoCourseContextDefined() {
$res=api_is_course_admin();
$this->assertFalse($res);
if($_SESSION['is_courseAdmin'] === 1) {
$this->assertTrue($res);
} else {
$this->assertFalse(is_bool($res));
}
var_dump($res);
}
function testApiIsCourseCoach() {

Loading…
Cancel
Save