summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Zalas <jakub@zalas.pl>2013-05-27 21:42:10 +0100
committerJakub Zalas <jakub@zalas.pl>2013-06-02 18:27:21 +0100
commitb92bb91cb0cb1042f26f5db266c8a4594311301b (patch)
treef7c1aadd9edd7d735b2dcdffdc32a1ef5fb0db59
parent4b591729a0599a283494e54be234c918ec6a2b9d (diff)
downloadsymfony-security-b92bb91cb0cb1042f26f5db266c8a4594311301b.zip
symfony-security-b92bb91cb0cb1042f26f5db266c8a4594311301b.tar.gz
symfony-security-b92bb91cb0cb1042f26f5db266c8a4594311301b.tar.bz2
[Security] Added a test to the BasicAuthenticationListener.
-rw-r--r--Tests/Http/Firewall/BasicAuthenticationListenerTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php
index 667869f..5870956 100644
--- a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php
+++ b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php
@@ -195,4 +195,18 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
$listener->handle($event);
}
+
+ /**
+ * @expectedException \InvalidArgumentException
+ * @expectedExceptionMessage $providerKey must not be empty
+ */
+ public function testItRequiresProviderKey()
+ {
+ new BasicAuthenticationListener(
+ $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'),
+ $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'),
+ '',
+ $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')
+ );
+ }
}