Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

Unit tests for base entity

Copyright: 2021 David Matamoros <davidmc@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 328 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes


Class: base_test  - X-Ref

Unit tests for base entity

test_get_table_alias()   X-Ref
Test entity table alias


test_get_table_alias_invalid()   X-Ref
Test for invalid get table alias


test_set_table_alias()   X-Ref
Test setting table alias


test_set_table_alias_invalid()   X-Ref
Test invalid entity set table alias


test_set_entity_name()   X-Ref
Test entity name


test_set_entity_name_invalid()   X-Ref
Test invalid entity name


test_set_entity_title()   X-Ref
Test entity title


test_add_join()   X-Ref
Test adding single join


test_add_joins()   X-Ref
Test adding multiple joins


test_add_duplicate_joins()   X-Ref
Test adding duplicate joins


test_get_column()   X-Ref
Test getting column


test_get_column_invalid()   X-Ref
Test for invalid get column


test_get_columns()   X-Ref
Test getting columns


test_get_filter()   X-Ref
Test getting filter


test_get_filter_invalid()   X-Ref
Test for invalid get filter


test_get_filters()   X-Ref
Test getting filters


test_get_condition()   X-Ref
Test getting condition


test_get_condition_invalid()   X-Ref
Test for invalid get condition


test_get_conditions()   X-Ref
Test getting conditions


Class: base_test_entity  - X-Ref

Simple implementation of the base entity

get_default_table_aliases()   X-Ref
Table aliases

return: array

get_default_entity_title()   X-Ref
Entity title

return: lang_string

initialise()   X-Ref
Initialise entity

return: base