You are here

public static function LdapExplodeDnMock::ldapExplodeDn in Lightweight Directory Access Protocol (LDAP) 8.3

Same name and namespace in other branches
  1. 8.4 ldap_servers/tests/src/Unit/LdapExplodeDnMock.php \Drupal\Tests\ldap_servers\Unit\LdapExplodeDnMock::ldapExplodeDn()

Simulate explode_dn.

Return value

array DN exploded, input ignored.

File

ldap_servers/tests/src/Unit/TokenTests.php, line 21

Class

LdapExplodeDnMock
Helper class to make it possible to simulate ldap_explode_dn().

Namespace

Drupal\Tests\ldap_servers\Unit

Code

public static function ldapExplodeDn($input) {
  return [
    'count' => 4,
    0 => 'cn=hpotter',
    1 => 'ou=Gryffindor',
    2 => 'ou=student',
    3 => 'ou=people',
    4 => 'dc=hogwarts',
    5 => 'dc=edu',
  ];
}