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]

Tests for class \core_customfield\api.

Copyright: 2018 Toni Barbera <toni@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 265 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_customfield_api_testcase  - 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.