Documentation

LdapiTestTrait

Use local fixtures instead of actual LDAP connection

When this trait is included, no actual LDAP connection is used. This allows you to use your own users fixtures data instead of actual data, and to run your tests without having access to the LDAP server. Note the "@before" flag, this marks a function to be run before each test.

This trait will trigger the usage of LDAP fixtures. To use, create a property in your test case like:

     $this->ldap_fixtures = [
         \App\Test\Fixture\LdapUsersFixture::class, // Full namespace
         'app.LdapUsers', // Or use abstract namespace
     ];

And let your class extends the LDAPI\TestSuite\Fixture\TestFixture class.

Table of Contents

$ldap_fixtures  : array<string|int, string>
cleanupLdapiTrait()  : void
Rests connection
setupConnections()  : void
Replace LDAPIConnection with a fixed one

Properties

$ldap_fixtures

public array<string|int, string> $ldap_fixtures

List of fixtures to be used

Methods

cleanupLdapiTrait()

Rests connection

public cleanupLdapiTrait() : void
Tags
after
Return values
void

setupConnections()

Replace LDAPIConnection with a fixed one

public setupConnections() : void
Tags
before
Return values
void

Search results