diff options
author | Jakub Zalas <jakub@zalas.pl> | 2013-05-27 21:42:10 +0100 |
---|---|---|
committer | Jakub Zalas <jakub@zalas.pl> | 2013-06-02 18:27:21 +0100 |
commit | b92bb91cb0cb1042f26f5db266c8a4594311301b (patch) | |
tree | f7c1aadd9edd7d735b2dcdffdc32a1ef5fb0db59 | |
parent | 4b591729a0599a283494e54be234c918ec6a2b9d (diff) | |
download | symfony-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.php | 14 |
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') + ); + } } |