diff --git a/enrol/tests/externallib_test.php b/enrol/tests/externallib_test.php index d5ebb5dce87..c81ac56a143 100644 --- a/enrol/tests/externallib_test.php +++ b/enrol/tests/externallib_test.php @@ -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); diff --git a/lib/dml/tests/mysqli_native_moodle_database_test.php b/lib/dml/tests/mysqli_native_moodle_database_test.php index dd17338224a..565ee41c266 100644 --- a/lib/dml/tests/mysqli_native_moodle_database_test.php +++ b/lib/dml/tests/mysqli_native_moodle_database_test.php @@ -122,7 +122,8 @@ class mysqli_native_moodle_database_test extends \advanced_testcase { } catch (moodle_exception $e) { // ... or fail. // Unfortunately we cannot be sure with the error string. - $this->markTestIncomplete('SSL not supported?'); + $this->markTestSkipped('MySQL server does not support SSL. Unable to complete the test.'); + return; } try { diff --git a/lib/dml/tests/pgsql_native_moodle_database_test.php b/lib/dml/tests/pgsql_native_moodle_database_test.php index 3e0a32e5546..09e6030391d 100644 --- a/lib/dml/tests/pgsql_native_moodle_database_test.php +++ b/lib/dml/tests/pgsql_native_moodle_database_test.php @@ -409,7 +409,8 @@ class pgsql_native_moodle_database_test extends \advanced_testcase { // ... or fail with SSL not supported. $this->assertStringContainsString($pgconnerr, $e->debuginfo); $this->assertStringContainsString('server does not support SSL', $e->debuginfo); - $this->markTestIncomplete('SSL not supported.'); + $this->markTestSkipped('Postgres server does not support SSL. Unable to complete the test.'); + return; } try {