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.

(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