setUsername() публичный Метод

Set the username that will be used in the authentication operation.
public setUsername ( string $username )
$username string
Пример #1
0
 function it_should_attempt_to_authenticate_a_username_and_password(LdapConnectionInterface $connection)
 {
     $operation = new AuthenticationOperation();
     $operation->setUsername('foo')->setPassword('bar');
     $response = new AuthenticationResponse(true);
     $domainConfig = new DomainConfiguration('example.local');
     $connection->getConfig()->willReturn($domainConfig);
     $connection->execute($operation)->willReturn($response);
     $this->beConstructedWith(new Configuration(), $connection);
     $this->authenticate('foo', 'bar')->shouldBeEqualTo(true);
 }