Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

Persistent class tests.

Copyright: 2015 Frédéric Massart - FMCorz.net
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 546 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes


Class: core_persistent_testcase  - X-Ref

Persistent testcase.

setUp()   X-Ref
No description

make_persistent_table()   X-Ref
Make the table for the persistent.


test_properties_definition()   X-Ref
No description

test_to_record()   X-Ref
No description

test_from_record()   X-Ref
No description

test_from_record_invalid_param()   X-Ref
No description

test_validate()   X-Ref
No description

test_validation_required()   X-Ref
No description

test_validation_custom()   X-Ref
No description

test_validation_custom_message()   X-Ref
No description

test_validation_choices()   X-Ref
No description

test_validation_type()   X-Ref
No description

test_validation_null()   X-Ref
No description

test_create()   X-Ref
No description

test_update()   X-Ref
No description

test_save()   X-Ref
No description

test_read()   X-Ref
No description

test_delete()   X-Ref
No description

test_has_property()   X-Ref
No description

test_custom_setter_getter()   X-Ref
No description

test_record_exists()   X-Ref
No description

test_get_sql_fields()   X-Ref
No description

test_get_sql_fields_too_long()   X-Ref
No description

Class: core_testable_persistent  - X-Ref

Example persistent class.

define_properties()   X-Ref
No description

before_validate()   X-Ref
No description

before_create()   X-Ref
No description

before_update()   X-Ref
No description

before_delete()   X-Ref
No description

after_create()   X-Ref
No description

after_update($result)   X-Ref
No description

after_delete($result)   X-Ref
No description

get_path()   X-Ref
No description

set_path($value)   X-Ref
No description

validate_sortorder($value)   X-Ref
No description