Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]

(no description)

File Size: 574 lines (25 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: plugin_test  - X-Ref

LDAP authentication plugin tests.

NOTE: in order to execute this test you need to set up
OpenLDAP server with core, cosine, nis and internet schemas
and add configuration constants to config.php or phpunit.xml configuration file:

define('TEST_AUTH_LDAP_HOST_URL', 'ldap://127.0.0.1');
define('TEST_AUTH_LDAP_BIND_DN', 'cn=someuser,dc=example,dc=local');
define('TEST_AUTH_LDAP_BIND_PW', 'somepassword');
define('TEST_AUTH_LDAP_DOMAIN', 'dc=example,dc=local');

auth_ldap_provider()   X-Ref
Data provider for auth_ldap tests

Used to ensure that all the paged stuff works properly, irrespectively
of the pagesize configured (that implies all the chunking and paging
built in the plugis is doing its work consistently). Both searching and
not searching within subcontexts.

return: array[]

test_auth_ldap(int $pagesize, int $subcontext)   X-Ref
General auth_ldap testcase

param: int $pagesize Value to be configured in settings controlling page size.
param: int $subcontext Value to be configured in settings controlling searching in subcontexts.

test_ldap_user_loggedin_event()   X-Ref
Test logging in via LDAP calls a user_loggedin event.


test_ldap_user_signup()   X-Ref
Test logging in via LDAP calls a user_loggedin event.


create_ldap_user($connection, $topdn, $i)   X-Ref
No description

delete_ldap_user($connection, $topdn, $i)   X-Ref
No description

enable_plugin()   X-Ref
No description

recursive_delete($connection, $dn, $filter)   X-Ref
No description