class LdapExplodeDnMock in Lightweight Directory Access Protocol (LDAP) 8.4
Same name and namespace in other branches
- 8.3 ldap_servers/tests/src/Unit/TokenTests.php \Drupal\Tests\ldap_servers\Unit\LdapExplodeDnMock
Helper class to make it possible to simulate ldap_explode_dn().
Hierarchy
- class \Drupal\Tests\ldap_servers\Unit\LdapExplodeDnMock
Expanded class hierarchy of LdapExplodeDnMock
File
- ldap_servers/
tests/ src/ Unit/ LdapExplodeDnMock.php, line 10
Namespace
Drupal\Tests\ldap_servers\UnitView source
class LdapExplodeDnMock {
/**
* Simulate explode_dn.
*
* @return array
* DN exploded, input ignored.
*/
public static function ldapExplodeDn($input) : array {
return [
'count' => 4,
0 => 'cn=hpotter',
1 => 'ou=Gryffindor',
2 => 'ou=student',
3 => 'ou=people',
4 => 'dc=hogwarts',
5 => 'dc=edu',
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LdapExplodeDnMock:: |
public static | function | Simulate explode_dn. |