summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-10-10 11:27:33 +0200
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-10-10 11:27:33 +0200
commit26be1f663009d4edb0b2551687d82e649e1ce785 (patch)
tree0b6aafcfb10e7a7c752a630329aef8f8da2dc993
parenta08da3494fc2019ec4babbc82b952c2ee0b6b91c (diff)
parentb0d19eeb6e8f6e5a66264d6b64ba0d2fb451b92d (diff)
downloadsymfony-security-26be1f663009d4edb0b2551687d82e649e1ce785.zip
symfony-security-26be1f663009d4edb0b2551687d82e649e1ce785.tar.gz
symfony-security-26be1f663009d4edb0b2551687d82e649e1ce785.tar.bz2
minor #16186 [2.7][tests] Use @requires annotation when possible (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- [2.7][tests] Use @requires annotation when possible | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- b028aea [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();