diff --git a/tests/UnicaenAuthTest/Authentication/Adapter/LdapTest.php b/tests/UnicaenAuthTest/Authentication/Adapter/LdapTest.php index 166bff7d2ce4492162cb7e389383b90cfbc8ae7b..061e1df092b9fe5e8d8447da74b7c0bb62ecbc6a 100644 --- a/tests/UnicaenAuthTest/Authentication/Adapter/LdapTest.php +++ b/tests/UnicaenAuthTest/Authentication/Adapter/LdapTest.php @@ -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'));