Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401]

(no description)

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

Defines 1 class


Class: database_test  - X-Ref

Unit tests for the database helper class

test_generate_alias()   X-Ref
Test generating alias


test_generate_aliases()   X-Ref
Test generating multiple aliases


test_generate_param_name()   X-Ref
Test generating parameter name


test_generate_param_names()   X-Ref
Test generating multiple parameter names


test_validate_params()   X-Ref
Test parameter validation


test_validate_params_invalid()   X-Ref
Test parameter validation for invalid parameters


test_generated_data_in_query()   X-Ref
Generate aliases and parameters and confirm they can be used within a query


test_sql_replace_parameter_names()   X-Ref
Test replacement of parameter names within SQL statements