diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2013-02-11 12:27:01 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2013-02-11 12:27:01 +0100 |
commit | 65dc82d282f0302ea71f6d2a926c90a578086ae7 (patch) | |
tree | f4e26f14648ae0ce1e9cf4df242271a683ee15a3 /Tests/Http | |
parent | b07438001ee3a6f77dad5616d05a2d6269328ead (diff) | |
parent | 6efa9a2145a067d4034e24f86a0e0e37611472d3 (diff) | |
download | symfony-security-65dc82d282f0302ea71f6d2a926c90a578086ae7.zip symfony-security-65dc82d282f0302ea71f6d2a926c90a578086ae7.tar.gz symfony-security-65dc82d282f0302ea71f6d2a926c90a578086ae7.tar.bz2 |
Merge branch '2.2'
* 2.2:
Fixed XmlFileLoaderTest::testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation
moved file hash calculation to own method
[Validator] Add check for existing metadata on property
added support for the X-Forwarded-For header (closes #6982, closes #7000)
fixed the IP address in HttpCache when calling the backend
[EventDispatcher] Added assertion.
[EventDispathcer] Fix removeListener
[DependencyInjection] Add clone for resources which were introduced in 2.1
[DependencyInjection] Allow frozen containers to be dumped to graphviz
Fix 'undefined index' error, when entering scope recursively
[Security] fixed session creation on login (closes #7011)
replaced usage of the deprecated pattern routing key (replaced with path)
Add dot character `.` to legal mime subtype regular expression
[HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)
Diffstat (limited to 'Tests/Http')
-rw-r--r-- | Tests/Http/Firewall/ContextListenerTest.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/Http/Firewall/ContextListenerTest.php b/Tests/Http/Firewall/ContextListenerTest.php index 2a8a28e..ffe6195 100644 --- a/Tests/Http/Firewall/ContextListenerTest.php +++ b/Tests/Http/Firewall/ContextListenerTest.php @@ -99,6 +99,25 @@ class ContextListenerTest extends \PHPUnit_Framework_TestCase $listener = new ContextListener($this->securityContext, array(), 'session'); $listener->onKernelResponse($event); + $this->assertTrue($session->isStarted()); + } + + public function testOnKernelResponseWithoutSessionNorToken() + { + $request = new Request(); + $session = new Session(new MockArraySessionStorage()); + $request->setSession($session); + + $event = new FilterResponseEvent( + $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), + $request, + HttpKernelInterface::MASTER_REQUEST, + new Response() + ); + + $listener = new ContextListener($this->securityContext, array(), 'session'); + $listener->onKernelResponse($event); + $this->assertFalse($session->isStarted()); } |