Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

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

Defines 1 class


Class: ldap_test  - X-Ref

LDAP enrolment 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_ENROL_LDAP_HOST_URL', 'ldap://127.0.0.1');
define('TEST_ENROL_LDAP_BIND_DN', 'cn=someuser,dc=example,dc=local');
define('TEST_ENROL_LDAP_BIND_PW', 'somepassword');
define('TEST_ENROL_LDAP_DOMAIN', 'dc=example,dc=local');

enrol_ldap_provider()   X-Ref
Data provider for enrol_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_enrol_ldap(int $pagesize, int $subcontext)   X-Ref
General enrol_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.

assertIsEnrolled($courseid, $userid, $roleid, $status=null)   X-Ref
No description

assertIsNotEnrolled($courseid, $userid)   X-Ref
No description

enable_plugin()   X-Ref
No description

disable_plugin()   X-Ref
No description

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

test_objectclass_fetch($usertype, $expected)   X-Ref
Test that normalisation of the use objectclass is completed successfully.

param: string $usertype The supported user type
param: string $expected The expected filter value

objectclass_fetch_provider()   X-Ref
Data provider for the test_objectclass_fetch testcase.

return: array of testcases.