Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 39 and 402]

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