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: 281 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: helper_test  - X-Ref

Class containing unit tests for the helper class.

test_build_node_path(string $id, string $name, string $rootpath, string $expected)   X-Ref
Test build_node_path().

param: string $id The ID of the node
param: string $name The name of the node
param: string $rootpath The path to append the node on
param: string $expected The expected node path

build_node_path_provider()   X-Ref
Data provider for test_build_node_path().

return: array

test_explode_node_path(string $node, array $expected)   X-Ref
Test explode_node_path().

param: string $node The node string to extract information from
param: array $expected The expected array containing the information about the node

explode_node_path_provider()   X-Ref
Data provider for test_explode_node_path().

return: array

test_get_browser(string $nodepath, string $expected)   X-Ref
Test get_browser().

param: string $nodepath The node path string
param: string $expected The expected browser class

get_browser_provider()   X-Ref
Data provider for test_get_browser().

return: array

test_get_node(\stdClass $gdcontent, string $expected)   X-Ref
Test get_node().

param: \stdClass $gdcontent The Google Drive content (file/folder) object
param: string $expected The expected content node class

get_node_provider()   X-Ref
Data provider for test_get_node().

return: array

test_request_exception(\Exception $exception, \Exception $expected)   X-Ref
Test request() when an exception is thrown by the API call.

param: \Exception $exception The exception thrown by the API call
param: \Exception $expected The expected exception thrown by request()

request_exception_provider()   X-Ref
Data provider for test_request_exception().

return: array