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 39 and 311]

(no description)

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

Defines 1 class


Class: api_test  - X-Ref

Functional test for class \core_customfield\api

get_generator()   X-Ref
Get generator.

return: core_customfield_generator

assert_property_in_array($expected, $array, $propertyname)   X-Ref
Help to assert that the given property in an array of object has the expected value

param: array $expected
param: array $array array of objects with "get($property)" method
param: string $propertyname

test_move_category()   X-Ref
Tests for \core_customfield\api::move_category() behaviour.

This replicates what is happening when categories are moved
in the interface using drag-drop.

test_get_categories_with_fields()   X-Ref
Tests for \core_customfield\api::get_categories_with_fields() behaviour.


test_save_category()   X-Ref
Test for functions api::save_category() and rename_category)


test_create_category()   X-Ref
Test for function handler::create_category


test_delete_category_with_fields()   X-Ref
Tests for \core_customfield\api::delete_category() behaviour.