You are here

protected function SimpleLdapUserManagerTest::setUpGetLdapUserTests in Simple LDAP 8

Helper method for getLdapUser tests.

2 calls to SimpleLdapUserManagerTest::setUpGetLdapUserTests()
SimpleLdapUserManagerTest::testGetLdapUser in modules/simple_ldap_user/tests/src/Unit/SimpleLdapUserManagerTest.php
@covers ::getLdapUser
SimpleLdapUserManagerTest::testGetLdapUserNotFound in modules/simple_ldap_user/tests/src/Unit/SimpleLdapUserManagerTest.php
@covers ::getLdapUser

File

modules/simple_ldap_user/tests/src/Unit/SimpleLdapUserManagerTest.php, line 216
Contains \Drupal\Tests\simple_ldap\Unit\SimpleLdapUserManagerTest

Class

SimpleLdapUserManagerTest
@coversDefaultClass \Drupal\simple_ldap_user\SimpleLdapUserManager @group simple_ldap

Namespace

Drupal\Tests\simple_ldap\Unit

Code

protected function setUpGetLdapUserTests() {
  $this->config
    ->expects($this
    ->exactly(5))
    ->method('get')
    ->withConsecutive([
    'name_attribute',
  ], [
    'mail_attribute',
  ], [
    'basedn',
  ], [
    'user_scope',
  ], [
    'object_class',
  ])
    ->will($this
    ->onConsecutiveCalls('cn', 'mail', 'dc=local', 'sub', array(
    'inetOrgPerson',
    'person',
  )));
  $this->server
    ->expects($this
    ->once())
    ->method('bind')
    ->willReturn(TRUE);
}