summaryrefslogtreecommitdiffstats
path: root/Http/Tests/Session/SessionAuthenticationStrategyTest.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-01-07 13:26:05 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2015-01-07 13:26:05 +0100
commitdc446ba3c9a71c06fea50ff71c0459899c23e237 (patch)
tree7ac93bfa78554e5a45b32703a1f3522d39354c81 /Http/Tests/Session/SessionAuthenticationStrategyTest.php
parentd5af07037de16d42a7037fc1c33a6f77b34244c3 (diff)
parent21689b9e96aa820bcb2a2979d04685675497f736 (diff)
downloadsymfony-security-dc446ba3c9a71c06fea50ff71c0459899c23e237.zip
symfony-security-dc446ba3c9a71c06fea50ff71c0459899c23e237.tar.gz
symfony-security-dc446ba3c9a71c06fea50ff71c0459899c23e237.tar.bz2
Merge branch '2.3' into 2.5v2.5.9
* 2.3: bumped Symfony version to 2.3.25 updated VERSION for 2.3.24 update CONTRIBUTORS for 2.3.24 updated CHANGELOG for 2.3.24 fixed tests [Security] Don't destroy the session on buggy php releases. Conflicts: src/Symfony/Component/Console/Tests/Fixtures/application_2.json src/Symfony/Component/HttpKernel/Kernel.php
Diffstat (limited to 'Http/Tests/Session/SessionAuthenticationStrategyTest.php')
-rw-r--r--Http/Tests/Session/SessionAuthenticationStrategyTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/Http/Tests/Session/SessionAuthenticationStrategyTest.php b/Http/Tests/Session/SessionAuthenticationStrategyTest.php
index a1f960f..4aef4b2 100644
--- a/Http/Tests/Session/SessionAuthenticationStrategyTest.php
+++ b/Http/Tests/Session/SessionAuthenticationStrategyTest.php
@@ -39,6 +39,10 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase
public function testSessionIsMigrated()
{
+ if (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50411) {
+ $this->markTestSkipped('We cannot destroy the old session on PHP 5.4.0 - 5.4.10.');
+ }
+
$session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
$session->expects($this->once())->method('migrate')->with($this->equalTo(true));
@@ -46,6 +50,19 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase
$strategy->onAuthentication($this->getRequest($session), $this->getToken());
}
+ public function testSessionIsMigratedWithPhp54Workaround()
+ {
+ if (PHP_VERSION_ID < 50400 || PHP_VERSION_ID >= 50411) {
+ $this->markTestSkipped('This PHP version is not affected.');
+ }
+
+ $session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
+ $session->expects($this->once())->method('migrate')->with($this->equalTo(false));
+
+ $strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE);
+ $strategy->onAuthentication($this->getRequest($session), $this->getToken());
+ }
+
public function testSessionIsInvalidated()
{
$session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');