You are here

class LdapExplodeDnMock in Lightweight Directory Access Protocol (LDAP) 8.4

Same name and namespace in other branches
  1. 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

Expanded class hierarchy of LdapExplodeDnMock

File

ldap_servers/tests/src/Unit/LdapExplodeDnMock.php, line 10

Namespace

Drupal\Tests\ldap_servers\Unit
View 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

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