Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
tool_policy\test\helper Class Reference

Provides some helper methods for unit-tests. More...

Static Public Member Functions

static add_policy ($params=[])
 Helper method that creates a new policy for testing.
 
static create_versions ($numversions=2)
 Helper method that prepare a policy document with some versions.
 

Detailed Description

Provides some helper methods for unit-tests.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ add_policy()

static tool_policy\test\helper::add_policy ( $params = [])
static

Helper method that creates a new policy for testing.

Parameters
array$params
Return values
policy_version

◆ create_versions()

static tool_policy\test\helper::create_versions ( $numversions = 2)
static

Helper method that prepare a policy document with some versions.

Parameters
int$numversionsThe number of policy versions to create.
Return values
arrayArray with all the policy versions created.

The documentation for this class was generated from the following file: