You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
769 B
36 lines
769 B
9 years ago
|
<?php
|
||
7 years ago
|
/**
|
||
|
* @link http://www.yiiframework.com/
|
||
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
||
|
* @license http://www.yiiframework.com/license/
|
||
|
*/
|
||
9 years ago
|
|
||
7 years ago
|
namespace yiiunit\framework\web\session;
|
||
9 years ago
|
|
||
|
use yii\web\Session;
|
||
|
use yiiunit\TestCase;
|
||
|
|
||
|
/**
|
||
|
* @group web
|
||
|
*/
|
||
|
class SessionTest extends TestCase
|
||
|
{
|
||
|
/**
|
||
7 years ago
|
* Test to prove that after Session::destroy session id set to old value.
|
||
9 years ago
|
*/
|
||
|
public function testDestroySessionId()
|
||
|
{
|
||
|
$session = new Session();
|
||
|
$session->open();
|
||
|
$oldSessionId = @session_id();
|
||
|
|
||
|
$this->assertNotEmpty($oldSessionId);
|
||
|
|
||
|
$session->destroy();
|
||
|
|
||
|
$newSessionId = @session_id();
|
||
|
$this->assertNotEmpty($newSessionId);
|
||
|
$this->assertEquals($oldSessionId, $newSessionId);
|
||
|
}
|
||
|
}
|