setBindFormat() public method

Set the format a username should be bound as.
public setBindFormat ( string $bindFormat )
$bindFormat string
 function it_should_use_a_custom_format_definition()
 {
     $config = new DomainConfiguration('example.local');
     $config->setBindFormat('%username%');
     $this->beConstructedThrough('getInstance', [$config]);
     $this->getUsername('foo')->shouldBeEqualTo('foo');
 }
Exemplo n.º 2
0
 function it_should_use_a_custom_format_definition()
 {
     $config = new DomainConfiguration('example.local');
     $config->setLdapType(LdapConnection::TYPE_OPENLDAP);
     $config->setBindFormat('CN=%username%,DC=foo,DC=bar');
     $this->beConstructedThrough('getInstance', [$config]);
     $this->getUsername('foo')->shouldBeEqualTo('CN=foo,DC=foo,DC=bar');
 }