Skip to content
Snippets Groups Projects
Commit 0c905a79 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout tests pour meilleure couverture.

parent 5c1d73d6
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,14 @@ class LdapTest extends PHPUnit_Framework_TestCase
$this->assertEquals(array_combine($connectionNames, $connectionParams), $adapter->getOptions());
}
public function testAuthenticatingReturnsNullIfAlreadyStatisfied()
{
$event = new AdapterChainEvent();
$this->adapter->setSatisfied();
$this->assertNull($this->adapter->authenticate($event));
$this->assertEquals($event->getCode(), Result::SUCCESS);
}
public function testUsurpationWithAllowedUsernameAndSuccessfulAuthentication()
{
$this->authModuleOptions->setUsurpationAllowedUsernames(array('usurpateur'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment