MDL-81457 core: Do not mark tests as Incomplete when they are wrong
This check was marking a test as Incomplete if there was a bug in any part of the test, rather than failing the test in such a way that the test bug may be found. https://docs.phpunit.de/en/9.6/incomplete-and-skipped-tests.html
This commit is contained in:
@@ -328,8 +328,9 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
$this->expectExceptionMessage($exception['message']);
|
||||
} else {
|
||||
// Failed, only canview and exception are supported.
|
||||
$this->markTestIncomplete('Incomplete, only canview and exception are supported');
|
||||
throw new \coding_exception('Incomplete, only canview and exception are supported');
|
||||
}
|
||||
|
||||
// Switch to the user and assign the role.
|
||||
$this->setUser(${$user});
|
||||
role_assign($roleid, $USER->id, $coursecontext);
|
||||
|
||||
Reference in New Issue
Block a user