You are here

class LdapExplodeDnMock 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

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

Hierarchy

Expanded class hierarchy of LdapExplodeDnMock

File

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

Namespace

Drupal\Tests\ldap_servers\Unit
View source
class LdapExplodeDnMock {

  /**
   * Simulate explode_dn.
   *
   * @return array
   *   DN exploded, input ignored.
   */
  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',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LdapExplodeDnMock::ldapExplodeDn public static function Simulate explode_dn.