From 4ef307276664fe67d254cedcbe03cf36f8ccfa83 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Wed, 23 Jul 2025 14:15:52 +0100 Subject: [PATCH] This test was flaky, probably due to the PHP statcache. --- tests/Unit/LdapTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php index a492b1efbc..538f542ebb 100644 --- a/tests/Unit/LdapTest.php +++ b/tests/Unit/LdapTest.php @@ -228,6 +228,7 @@ class LdapTest extends TestCase $this->settings->enableLdap()->set(['ldap_client_tls_cert' => 'SAMPLE CERT TEXT']); $client_side_cert_path = Setting::get_client_side_cert_path(); file_put_contents($client_side_cert_path, 'WEIRDLY UPDATED CERT FILE'); + clearstatcache(); //the system should respect our cache-file, since the settings haven't been updated $possibly_recached_cert_file = Setting::get_client_side_cert_path(); //this should *NOT* re-cache from the Settings $this->assertStringEqualsFile($possibly_recached_cert_file, 'WEIRDLY UPDATED CERT FILE');