Fix tests for use_trans_id

This commit is contained in:
Alex Negrila
2025-04-04 11:53:53 +03:00
parent 03b0b8f299
commit e5d1dbbd1e

View File

@ -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);