From d9a8eb2bdbc7d51630b465784a2281d7a76c8a14 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 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 {