[Security] Fixed test cases of the Csrf sub-component
This commit is contained in:
parent
2cd6e002c7
commit
7c7d86e369
@ -51,6 +51,10 @@ class NativeSessionTokenStorageTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testStoreTokenInClosedSessionWithExistingSessionId()
|
public function testStoreTokenInClosedSessionWithExistingSessionId()
|
||||||
{
|
{
|
||||||
|
if (version_compare(PHP_VERSION, '5.4', '<')) {
|
||||||
|
$this->markTestSkipped('This test requires PHP 5.4 or later.');
|
||||||
|
}
|
||||||
|
|
||||||
session_id('foobar');
|
session_id('foobar');
|
||||||
|
|
||||||
$this->assertSame(PHP_SESSION_NONE, session_status());
|
$this->assertSame(PHP_SESSION_NONE, session_status());
|
||||||
|
@ -32,7 +32,7 @@ class SessionTokenStorageTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Session\SessionInterface')) {
|
if (!interface_exists('Symfony\Component\HttpFoundation\Session\SessionInterface')) {
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user