Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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: