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 310 and 401] [Versions 39 and 401]

(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.