mirror of
https://github.com/yiisoft/yii2.git
synced 2025-10-30 10:08:08 +08:00
Fix tests for use_trans_id
This commit is contained in:
@ -47,8 +47,13 @@ class SessionTest extends TestCase
|
|||||||
$oldUseTransparentSession = $session->getUseTransparentSessionID();
|
$oldUseTransparentSession = $session->getUseTransparentSessionID();
|
||||||
$session->setUseTransparentSessionID(true);
|
$session->setUseTransparentSessionID(true);
|
||||||
$newUseTransparentSession = $session->getUseTransparentSessionID();
|
$newUseTransparentSession = $session->getUseTransparentSessionID();
|
||||||
$this->assertNotEquals($oldUseTransparentSession, $newUseTransparentSession);
|
if (PHP_VERSION_ID < 80400) {
|
||||||
$this->assertTrue($newUseTransparentSession);
|
$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
|
//without this line phpunit will complain about risky tests due to unclosed buffer
|
||||||
$session->setUseTransparentSessionID(false);
|
$session->setUseTransparentSessionID(false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user