From e18c4b4d13339b3cc875c27d25c9cb6be5ca1d3e Mon Sep 17 00:00:00 2001 From: costdev Date: Sat, 30 Nov 2024 11:12:08 +0000 Subject: [PATCH] Ensure `Admin_Settings::get_setting()` tests run in separate processes. --- .../tests/AdminSettings/AdminSettings_GetSettingTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/phpunit/tests/AdminSettings/AdminSettings_GetSettingTest.php b/tests/phpunit/tests/AdminSettings/AdminSettings_GetSettingTest.php index 9516f90..16db74d 100644 --- a/tests/phpunit/tests/AdminSettings/AdminSettings_GetSettingTest.php +++ b/tests/phpunit/tests/AdminSettings/AdminSettings_GetSettingTest.php @@ -8,6 +8,12 @@ /** * Tests for Admin_Settings::get_setting() * + * These tests cause constants to be defined. + * They must run in separate processes and must not preserve global state. + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + * * @covers \AspireUpdate\Admin_Settings::get_setting */ class AdminSettings_GetSettingTest extends WP_UnitTestCase {