setLdapType() public method

Set the LDAP type for this domain.
public setLdapType ( string $ldapType )
$ldapType string The LDAP type.
Exemplo n.º 1
0
 function it_should_throw_a_SchemaParserException_when_the_schema_file_is_not_readable()
 {
     $fakePath = '/this/path/should/never/really/exist/I/would/hope';
     $this->beConstructedWith($fakePath);
     $domain = new DomainConfiguration('example.com');
     $domain->setLdapType('ad');
     $this->shouldThrow(new SchemaParserException('Cannot find schema for "ad" in "' . $fakePath . '"'))->duringParse($domain->getLdapType(), 'user');
 }
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');
 }