From 14eaf24b66916ab43665c2a4296e73b3c4a406c1 Mon Sep 17 00:00:00 2001 From: Dave MacFarlane Date: Wed, 24 Apr 2024 14:45:51 -0400 Subject: [PATCH] Fix unit test --- test/unittests/NDB_ConfigTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/unittests/NDB_ConfigTest.php b/test/unittests/NDB_ConfigTest.php index a41c451d6e9..1dbbea6b65a 100644 --- a/test/unittests/NDB_ConfigTest.php +++ b/test/unittests/NDB_ConfigTest.php @@ -31,6 +31,19 @@ class FakeConfig extends NDB_Config public function __construct() { } + + /** + * Disable the settings cache for testing purposes. + * + * @param string $name The name of the setting to retrieve + * + * @return mixed The contents of the node identified by $name + */ + function getSetting(string $name) + { + $this->settingCache = []; + return parent::getSetting($name); + } } /** * Unit test for NDB_Config class