bug#9183 [Security] Fixed test cases of the Csrf sub-component (bschussek)
This PR was merged into the master branch.
Discussion
----------
[Security] Fixed test cases of the Csrf sub-component
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
7c7d86e
[Security] Fixed test cases of the Csrf sub-component
This commit is contained in:
commit
b85b78f24a
@ -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