From 2a9e8499ffdc9d67367d798e3670e5389a36dd7f Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Fri, 23 Jan 2026 12:11:05 +0800 Subject: [PATCH] MDL-87648 core: Ignore optional environment checks --- public/lib/tests/environmentlib_test.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/lib/tests/environmentlib_test.php b/public/lib/tests/environmentlib_test.php index d32808514ca..9ad5283151d 100644 --- a/public/lib/tests/environmentlib_test.php +++ b/public/lib/tests/environmentlib_test.php @@ -65,7 +65,11 @@ final class environmentlib_test extends \advanced_testcase { * @param environment_results $result */ public function test_environment($result): void { - $sslmessages = ['ssl/tls configuration not supported', 'invalid ssl/tls configuration']; + $optionaltests = [ + 'ssl/tls configuration not supported', + 'invalid ssl/tls configuration', + 'Router not configured', + ]; if ( $result->part === 'php_setting' @@ -99,7 +103,7 @@ final class environmentlib_test extends \advanced_testcase { && $result->getLevel() === 'optional' && $result->getStatus() === false ) { - if (in_array($result->info, $sslmessages)) { + if (in_array($result->info, $optionaltests)) { $this->markTestSkipped('Up-to-date TLS libraries are not necessary for unit testing.'); } if ($result->info === 'php not 64 bits' && PHP_INT_SIZE == 4) { @@ -107,6 +111,7 @@ final class environmentlib_test extends \advanced_testcase { $this->markTestSkipped('64-bit check is not necessary for unit testing.'); } } + $info = "{$result->part}:{$result->info}"; $this->assertTrue($result->getStatus(), "Problem detected in environment ($info), fix all warnings and errors!"); }