moodle/lib/tests
Iñaki Arenaza 67bebb69eb MDL-57558 ldap: fix ldap_get_entries_moodle()
While ldap_get_entries_moodle() PHPdocs state that it returns "array
ldap-entries with lower-cased attributes as indexes.", this is not true. It
uses ldap_get_attributes() internally, which returns both numerically indexed
attribute names, and dictionary-like entries indexed by attribute names.

Current code lowercases the dictionary-like entries, but then uses the
numerically indexed entries for the attribute names used as keys in the
returned array. The numerically indexed names might or might not be lowercased,
depending on the LDAP server and PHP version) version. E.g., OpenLDAP 2.x,
Novell eDirectory 8.x and MS Active Directory return mixed-cased attribute
names, and PHP 5.x and PHP 7.x don't lowercase them inside ldap_get_entries().

This is probably why all calls to ldap_get_entries_moodle() are followed by
calls to array_change_key_case(), even if that shouldn't be necessary.

So make sure we always return lower-cased attributs as indexes and add some
unit tests to avoid regressions in the future.
2017-05-16 10:48:27 +01:00
..
behat MDL-58643 behat: ensure results are in first page + multi suite fix. 2017-04-28 12:47:55 +08:00
fixtures MDL-55528 fileconverter_unoconv: Add new unoconv plugin 2017-03-10 10:45:46 +08:00
other MDL-56013 lib: Create a page to test Chart.js 2016-09-21 08:25:13 +08:00
performance MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
accesslib_test.php MDL-57027 fix get_users_by_capability() 2017-02-01 13:01:28 +08:00
adhoc_task_test.php MDL-52385 tasks: Queue ad-hoc tasks in future 2016-04-07 11:49:52 +08:00
admintree_test.php MDL-56006 theme: Set Boost as the default theme 2016-10-25 10:15:20 +08:00
ajaxlib_test.php MDL-55091 phpunit: Following has been deprecated. 2016-07-26 10:11:30 +08:00
antivirus_test.php MDL-50888 antivirus: Unit test refactoring. 2016-10-21 11:48:49 +01:00
authlib_test.php
blocklib_test.php MDL-58040 blocklib: never use global in block manager class 2017-02-21 15:19:11 +00:00
calendar_cron_task_test.php MDL-58803 calendar: Require calendar/lib.php 2017-05-04 13:03:55 +08:00
collator_test.php
completionlib_test.php MDL-55628 Completion: Use simpledata for completion cache 2016-08-22 17:13:36 +01:00
component_test.php MDL-55528 core_files: Create new fileconverter plugintype 2017-03-10 09:31:14 +08:00
componentlib_test.php
configonlylib_test.php MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests 2017-04-18 03:40:17 +02:00
coursecatlib_test.php MDL-57101 filter: Always set-up the page for filters 2016-11-29 12:36:28 +08:00
cronlib_test.php
csslib_test.php MDL-56172 css: remove css optimiser 2016-09-29 16:40:40 +01:00
csvclass_test.php
curl_security_helper_test.php MDL-48498 core_files: curl_security_helper_base and implementation 2016-11-08 15:11:15 +08:00
customcontext_test.php
datalib_test.php MDL-52781 core_user: replace direct PARAM_ usages. 2016-04-21 15:24:36 +08:00
datalib_update_with_unique_index_test.php
date_legacy_test.php MDL-54008 tests: clarify comment in tz test 2016-05-03 09:08:27 +01:00
date_test.php MDL-50704 date: Fix invalid timezone mapping for +14 2016-05-09 17:28:38 +08:00
editorlib_test.php
environment_test.php MDL-55404 core_upgrade: Add libcurl environment checks 2016-09-06 11:34:46 +08:00
event_course_module_instance_list_viewed.php
event_course_module_viewed.php
event_deprecated_test.php
event_grade_deleted_test.php MDL-48012 core: fixed failing unit tests 2016-03-15 16:58:47 +08:00
event_test.php MDL-56674 core: Fix test_get_all_observers 2016-11-02 13:29:07 +11:00
event_unknown_logged_test.php
event_user_graded_test.php
event_user_password_updated_test.php
events_test.php
eventslib_test.php
exporter_test.php Merge branch 'MDL-57846-master' of git://github.com/jleyva/moodle 2017-02-07 00:12:30 +01:00
externallib_test.php MDL-58701 phpunit: Add tests for external_settings 2017-04-27 09:37:53 +05:30
filelib_test.php MDL-57101 filter: Always set-up the page for filters 2016-11-29 12:36:28 +08:00
filetypes_test.php
filter_manager_test.php MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests 2017-04-18 03:40:17 +02:00
filterlib_test.php MDL-57101 filter: Load globally available filters on every page 2016-12-01 14:51:40 +08:00
formslib_test.php MDL-56233 forms library: Fixed form identifier when mocking a form. 2016-12-05 11:27:05 +11:00
gdlib_test.php MDL-55445 gdlib: Support for resizing an image 2016-08-15 10:54:28 +08:00
gradelib_test.php
grades_externallib_test.php
grading_externallib_test.php MDL-55091 phpunit: Following has been deprecated. 2016-07-26 10:11:30 +08:00
grouplib_test.php MDL-58563 group: Specify table alias in sort parameter for group test 2017-04-11 12:40:41 +08:00
html2text_test.php MDL-53393 libraries: Upgrade Html2Text to 4.0.1 2016-03-21 12:05:33 +08:00
html_writer_test.php
htmlpurifier_test.php MDL-55581 htmlpurifier: test for attributes in video tag 2016-08-30 13:44:13 +08:00
ip_utils_test.php MDL-56334 tests: add some trivial cases to domain tests 2016-10-26 09:58:05 +01:00
jquery_test.php MDL-50937 jquery: Upgrade to 3.1, remove migrate plugins 2016-07-19 09:27:40 +08:00
ldaplib_test.php MDL-57558 ldap: fix ldap_get_entries_moodle() 2017-05-16 10:48:27 +01:00
lock_config_test.php
lock_test.php
markdown_test.php
mathslib_test.php
medialib_test.php MDL-58361 media: Remove media manager subclass from unit test 2017-03-28 12:11:14 +08:00
message_test.php MDL-58650 core_message: always use 'popup' processor for messages 2017-05-02 15:46:48 +08:00
messageinbound_test.php
messagelib_test.php MDL-58650 core_message: always use 'popup' processor for messages 2017-05-02 15:46:48 +08:00
minify_test.php MDL-53695 minify: switch to MatthiasMullie\Minify 2016-10-10 13:17:04 +01:00
modinfolib_test.php MDL-57878 core: fixed failing unit test 2017-04-03 11:37:09 +08:00
moodle_page_test.php MDL-55091 phpunit: Following has been deprecated. 2016-07-26 10:11:30 +08:00
moodlelib_test.php Merge branch 'MDL-54901' of git://github.com/stronk7/moodle 2017-04-19 11:30:03 +08:00
mustache_template_finder_test.php
myprofilelib_test.php
navigationlib_test.php MDL-53383 navigation: Do not require $type in remove() 2016-03-21 12:16:26 +08:00
notification_test.php MDL-30811 output: Add support for session notifications 2016-02-29 09:05:56 +08:00
oauth2_test.php MDL-58220 oauth2: Fix docs in test file 2017-04-03 13:43:26 +08:00
outputcomponents_test.php MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests 2017-04-18 03:40:17 +02:00
outputfactories_test.php
outputrequirementslib_test.php MDL-55071 theme/output: PHPCS fixes for new theme branch 2016-09-23 10:57:36 +01:00
persistent_test.php MDL-57859 persistent: Add a combined create/update call 2017-02-13 22:33:42 -05:00
plugin_manager_test.php
portfoliolib_test.php
progress_display_test.php MDL-55944 testing: Reduce sleep usage. 2016-09-14 09:49:30 +10:00
progress_test.php
questionlib_test.php MDL-29905 question: Auto remove stale questions upon category deletion 2016-05-30 12:26:09 +08:00
regex_test.php
requirejs_test.php MDL-55133 javascript: Correctly use component names in requirejs 2016-07-12 11:15:17 +08:00
rsslib_test.php
scheduled_task_test.php MDL-54008 timezone: Updating references to Caracas tz. 2016-05-02 15:08:54 +08:00
scss_test.php MDL-56992 core_scss: Don't allow invalid files to be included 2017-01-04 11:33:57 +00:00
session_manager_test.php MDL-30811 core: Initiate notifications on first use only 2016-03-02 13:30:09 +08:00
session_redis_test.php MDL-54606 session: Add redis handler with locking. 2016-08-04 21:50:11 +10:00
sessionlib_test.php MDL-55273 admin: Change $CFG->cookiesecure default to on 2016-08-22 09:20:32 +10:00
setuplib_test.php MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests 2017-04-18 03:40:17 +02:00
statslib_test.php MDL-22183 lib: More unit tests for next day start. 2016-08-18 10:13:31 +08:00
string_manager_standard_test.php MDL-56316 tests: Ensure consistent assertion count 2016-10-07 14:45:36 +08:00
tablelib_test.php
text_test.php MDL-55069 core: escape special characters in email headers 2016-07-04 12:27:58 +01:00
theme_config_test.php
update_api_test.php
update_checker_test.php MDL-55091 phpunit: Following has been deprecated. 2016-07-26 10:11:30 +08:00
update_code_manager_test.php MDL-55091 phpunit: Following has been deprecated. 2016-07-26 10:11:30 +08:00
update_validator_test.php
upgrade_util_test.php MDL-56917 core_upgrade: Do not use the raw version to check cURL caps. 2016-11-15 21:50:07 +01:00
upgradelib_test.php MDL-58692 auth: Improve the migration of auth setting names 2017-05-03 12:02:43 +02:00
user_menu_test.php MDL-57001 user_menu: Fixes for unit tests 2016-11-24 15:11:19 +08:00
user_test.php MDL-55837 themes: base and canvas themes removed 2016-09-19 13:35:13 +08:00
useragent_test.php MDL-53777 tool_mobile: New script for launching the mobile app 2016-10-03 10:02:33 +01:00
weblib_format_text_test.php MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests 2017-04-18 03:40:17 +02:00
weblib_test.php MDL-57379 Files: Improved file argument evaluation. 2017-02-19 16:39:04 +01:00
xhtml_container_stack_test.php