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

Unit Tests for the request transform helper.

Copyright: 2018 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 141 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

request_transform_test:: (5 methods):
  test_user()
  test_datetime()
  test_date()
  test_yesno()
  yesno_provider()


Class: request_transform_test  - X-Ref

Tests for the \core_privacy API's request transform helper functionality.

test_user()   X-Ref
Test that user translation currently does nothing.

We have not determined if we will do this or not, but we provide the functionality and encourgae people to use
it so that it can be retrospectively fitted if required.


test_datetime()   X-Ref
Test that the datetime is translated into a string.


test_date()   X-Ref
Test that the date is translated into a string.


test_yesno($input, $expected)   X-Ref
Ensure that the yesno function translates correctly.

param: mixed   $input The input to test
param: string  $expected The expected value

yesno_provider()   X-Ref
Data provider for tests of the yesno transformation.

return: array