From baf51652ca70eeb2621dde6d2e2299cd41a1cad7 Mon Sep 17 00:00:00 2001 From: Marco van 't Wout Date: Tue, 4 Jun 2024 14:06:43 +0200 Subject: [PATCH] Attempt to fix failing unit tests that use runInSeparateProcess --- tests/framework/web/CCookieCollectionTest.php | 2 ++ tests/framework/web/CHttpSessionTest.php | 1 + tests/framework/web/auth/CWebUserTest.php | 2 ++ 3 files changed, 5 insertions(+) diff --git a/tests/framework/web/CCookieCollectionTest.php b/tests/framework/web/CCookieCollectionTest.php index f217421b4b..999ee90cd2 100644 --- a/tests/framework/web/CCookieCollectionTest.php +++ b/tests/framework/web/CCookieCollectionTest.php @@ -38,6 +38,7 @@ public function testConstructorCookieBuilding() } /** * @runInSeparateProcess + * @preserveGlobalState disabled * @outputBuffering enabled */ public function testAdd() @@ -59,6 +60,7 @@ public function testAdd() } /** * @runInSeparateProcess + * @preserveGlobalState disabled * @outputBuffering enabled */ public function testRemove() diff --git a/tests/framework/web/CHttpSessionTest.php b/tests/framework/web/CHttpSessionTest.php index d904b028e4..cab82abf4a 100644 --- a/tests/framework/web/CHttpSessionTest.php +++ b/tests/framework/web/CHttpSessionTest.php @@ -16,6 +16,7 @@ protected function checkProb($gcProb) { * @covers CHttpSession::setGCProbability * * @runInSeparateProcess + * @preserveGlobalState disabled */ public function testSetGet() { Yii::app()->setComponents(array('session' => array( diff --git a/tests/framework/web/auth/CWebUserTest.php b/tests/framework/web/auth/CWebUserTest.php index 12e6305375..bdfec6aea4 100644 --- a/tests/framework/web/auth/CWebUserTest.php +++ b/tests/framework/web/auth/CWebUserTest.php @@ -31,6 +31,7 @@ public function booleanProvider() /** * @runInSeparateProcess + * @preserveGlobalState disabled * @outputBuffering enabled * @dataProvider booleanProvider */ @@ -59,6 +60,7 @@ public function testLoginLogout($destroySession) /** * @runInSeparateProcess + * @preserveGlobalState disabled * @outputBuffering enabled */ public function testCheckAccess()