From 60a2eba17de98fb13bb82d6c1d631101bc6b2a27 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Sun, 7 Apr 2024 23:31:26 +0800 Subject: [PATCH] MDL-81457 core: Mark SSL test as skipped, not incomplete The incomplete test is intended for tests which are written but whose code does not yet exist. https://docs.phpunit.de/en/9.6/incomplete-and-skipped-tests.html --- lib/dml/tests/mysqli_native_moodle_database_test.php | 3 ++- lib/dml/tests/pgsql_native_moodle_database_test.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/dml/tests/mysqli_native_moodle_database_test.php b/lib/dml/tests/mysqli_native_moodle_database_test.php index d40c5646d27..b1c6de7cef1 100644 --- a/lib/dml/tests/mysqli_native_moodle_database_test.php +++ b/lib/dml/tests/mysqli_native_moodle_database_test.php @@ -123,7 +123,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 5e3986035b6..6cf12887089 100644 --- a/lib/dml/tests/pgsql_native_moodle_database_test.php +++ b/lib/dml/tests/pgsql_native_moodle_database_test.php @@ -411,7 +411,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 {