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.
35 lines
769 B
35 lines
769 B
<?php |
|
/** |
|
* @link http://www.yiiframework.com/ |
|
* @copyright Copyright (c) 2008 Yii Software LLC |
|
* @license http://www.yiiframework.com/license/ |
|
*/ |
|
|
|
namespace yiiunit\framework\web\session; |
|
|
|
use yii\web\Session; |
|
use yiiunit\TestCase; |
|
|
|
/** |
|
* @group web |
|
*/ |
|
class SessionTest extends TestCase |
|
{ |
|
/** |
|
* Test to prove that after Session::destroy session id set to old value. |
|
*/ |
|
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); |
|
} |
|
}
|
|
|