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.

(no description)

File Size: 94 lines (4 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class

area_test_base:: (3 methods):
  array_from_recordset()
  assert_area_in_recordset()
  assert_area_in_array()


Class: area_test_base  - X-Ref

Class area_test_base provides some utility functions that can be used by testing.

array_from_recordset(\moodle_recordset $rs)   X-Ref
Create and return an array from a recordset. Recordset is destroyed.

param: \moodle_recordset $rs
return: array

assert_area_in_recordset(\moodle_recordset $areasrs, string $component, int $contextid, int $itemid,?int $courseid, ?int $categoryid)   X-Ref
Test for specified component information present in area recordset. Recordset cannot be reused.

param: \moodle_recordset $areasrs
param: string $component
param: int $contextid
param: int $itemid
param: int|null $courseid
param: int|null $categoryid
return: void

assert_area_in_array(array $areas, string $component, int $contextid, int $itemid,?int $courseid, ?int $categoryid)   X-Ref
Test for specified component information present in area array.

param: array $areas
param: string $component
param: int $contextid
param: int $itemid
param: int|null $courseid
param: int|null $categoryid
return: void