You are here

public function GroupManagerTest::setUp in Lightweight Directory Access Protocol (LDAP) 8.4

Overrides KernelTestBase::setUp

File

ldap_servers/tests/src/Kernel/GroupManagerTest.php, line 38

Class

GroupManagerTest
Group manager test.

Namespace

Drupal\Tests\ldap_servers\Kernel

Code

public function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('ldap_server');
  $this->server = Server::create([
    'id' => 'example',
  ]);
  $this->server
    ->set('grp_user_memb_attr', 'memberOf');
  $this->server
    ->set('grp_user_memb_attr_exists', TRUE);
  $bridge = new FakeBridge($this->container
    ->get('logger.channel.ldap_servers'), $this->container
    ->get('entity_type.manager'));
  $bridge
    ->setBindResult(TRUE);
  $this->container
    ->set('ldap.bridge', $bridge);
}