Merge remote-tracking branch 'origin/support/3.0' into develop

This commit is contained in:
Eric Espie
2022-11-23 11:07:09 +01:00
3 changed files with 59 additions and 2 deletions

View File

@@ -10,6 +10,18 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase;
*/
class SessionTest extends ItopTestCase
{
protected function setUp(): void
{
parent::setUp();
Session::$bAllowCLI = true;
}
protected function tearDown(): void
{
parent::tearDown();
Session::$bAllowCLI = false;
}
/**
* @covers \Combodo\iTop\Application\Helper\Session::Start
*/
@@ -121,4 +133,12 @@ class SessionTest extends ItopTestCase
$this->assertFalse(Session::IsSet(['test1', 'test2', 'test3']));
}
public function testRegenerateId()
{
Session::Start();
$iPrevSessionId = Session::$iSessionId;
Session::RegenerateId();
//$this->assertFalse(Session::IsSet('test'));
$this->assertNotEquals($iPrevSessionId, Session::$iSessionId);
}
}