Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
test_lock Class Reference

Tests lock to prevent concurrent executions of the same test suite. More...

Static Public Member Functions

static acquire (string $framework, string $lockfilesuffix='')
 Prevent parallel test execution - this can not work in Moodle because we modify database and dataroot.
 
static release (string $framework, string $lockfilesuffix='')
 Note: do not call manually!
 

Static Protected Member Functions

static get_lock_handle_name (string $framework, string $lockfilesuffix)
 Get the name of the lock handle stored in the class.
 

Static Protected Attributes

static array $lockhandles = array()
 Array of resource used for prevention of parallel test execution.
 

Detailed Description

Tests lock to prevent concurrent executions of the same test suite.

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

Member Function Documentation

◆ acquire()

static test_lock::acquire ( string $framework,
string $lockfilesuffix = '' )
static

Prevent parallel test execution - this can not work in Moodle because we modify database and dataroot.

Note: do not call manually!

◆ get_lock_handle_name()

static test_lock::get_lock_handle_name ( string $framework,
string $lockfilesuffix )
staticprotected

Get the name of the lock handle stored in the class.

Parameters
string$framework
string$lockfilesuffix
Return values
string

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