mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
单元测试完善
This commit is contained in:
@@ -124,7 +124,7 @@ class sessionTest extends \PHPUnit_Framework_TestCase
|
||||
// session_status()
|
||||
if (strstr(PHP_VERSION, 'hhvm')) {
|
||||
$this->assertEquals('', ini_get('session.auto_start'));
|
||||
}else{
|
||||
} else {
|
||||
$this->assertEquals(0, ini_get('session.auto_start'));
|
||||
}
|
||||
|
||||
@@ -213,6 +213,14 @@ class sessionTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(Session::get('sessionnamegetarrper.subname', 'think_'), $_SESSION['think_']['sessionnamegetarrper']['subname']);
|
||||
}
|
||||
|
||||
public function testPull()
|
||||
{
|
||||
Session::prefix(null);
|
||||
Session::set('sessionnamedel', 'sessionvalue');
|
||||
$this->assertEquals('sessionvalue', Session::pull('sessionnameget'));
|
||||
$this->assertNull(Session::get('sessionnameget'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers think\Session::delete
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user