Skip to content

Commit

Permalink
[Security] Added a test to the BasicAuthenticationListener.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzal committed Jun 2, 2013
1 parent 314f29a commit 307bc91
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -195,4 +195,18 @@ public function testHandleWithASimilarAuthenticatedToken()

$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')
);
}
}

0 comments on commit 307bc91

Please sign in to comment.