summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-10-08 11:41:54 +0200
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-10-10 11:00:45 +0200
commitb0d19eeb6e8f6e5a66264d6b64ba0d2fb451b92d (patch)
treeec165a2b23b82a5c99a82e971d722f058aa89157
parent13818e3015a2a20025ae65b6f57756795eaeda7e (diff)
downloadsymfony-security-b0d19eeb6e8f6e5a66264d6b64ba0d2fb451b92d.zip
symfony-security-b0d19eeb6e8f6e5a66264d6b64ba0d2fb451b92d.tar.gz
symfony-security-b0d19eeb6e8f6e5a66264d6b64ba0d2fb451b92d.tar.bz2
[tests] Use @requires annotation when possible
-rw-r--r--Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php7
-rw-r--r--Csrf/Tests/TokenStorage/SessionTokenStorageTest.php4
2 files changed, 3 insertions, 8 deletions
diff --git a/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php b/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
index 0039deb..7d3a537 100644
--- a/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
+++ b/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
@@ -50,12 +50,11 @@ class NativeSessionTokenStorageTest extends \PHPUnit_Framework_TestCase
$this->assertSame(array(self::SESSION_NAMESPACE => array('token_id' => 'TOKEN')), $_SESSION);
}
+ /**
+ * @requires PHP 5.4
+ */
public function testStoreTokenInClosedSessionWithExistingSessionId()
{
- if (PHP_VERSION_ID < 50400) {
- $this->markTestSkipped('This test requires PHP 5.4 or later.');
- }
-
session_id('foobar');
$this->assertSame(PHP_SESSION_NONE, session_status());
diff --git a/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php b/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php
index 4166c1e..0eac0a8 100644
--- a/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php
+++ b/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php
@@ -32,10 +32,6 @@ class SessionTokenStorageTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- if (!interface_exists('Symfony\Component\HttpFoundation\Session\SessionInterface')) {
- $this->markTestSkipped('The "HttpFoundation" component is not available');
- }
-
$this->session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')
->disableOriginalConstructor()
->getMock();