From e5d1dbbd1ef962fc5b560aa332d6c803e11a85c7 Mon Sep 17 00:00:00 2001 From: Alex Negrila Date: Fri, 4 Apr 2025 11:53:53 +0300 Subject: [PATCH] Fix tests for use_trans_id --- tests/framework/web/session/SessionTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/framework/web/session/SessionTest.php b/tests/framework/web/session/SessionTest.php index 7dfe1f17d9..78c84f3ba5 100644 --- a/tests/framework/web/session/SessionTest.php +++ b/tests/framework/web/session/SessionTest.php @@ -47,8 +47,13 @@ class SessionTest extends TestCase $oldUseTransparentSession = $session->getUseTransparentSessionID(); $session->setUseTransparentSessionID(true); $newUseTransparentSession = $session->getUseTransparentSessionID(); - $this->assertNotEquals($oldUseTransparentSession, $newUseTransparentSession); - $this->assertTrue($newUseTransparentSession); + if (PHP_VERSION_ID < 80400) { + $this->assertNotEquals($oldUseTransparentSession, $newUseTransparentSession); + $this->assertTrue($newUseTransparentSession); + } else { + $this->assertEquals($oldUseTransparentSession, $newUseTransparentSession); + $this->assertFalse($newUseTransparentSession); + } //without this line phpunit will complain about risky tests due to unclosed buffer $session->setUseTransparentSessionID(false);