Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | List of all members
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. More...
 
static create_versions ($numversions=2)
 Helper method that prepare a policy document with some versions. More...
 

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: