Commit 0c905a79 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout tests pour meilleure couverture.

parent 5c1d73d6
......@@ -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'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment