Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
behat_config_manager Class Reference

Behat configuration manager. More...

Static Public Member Functions

static create_parallel_site_links ($fromrun, $torun)
 Create parallel site links.
 
static drop_parallel_site_links ()
 Drops parallel site links.
 
static get_behat_cli_config_filepath ($runprocess=0)
 Returns the behat config file path used by the behat cli command.
 
static get_behat_run_config_file_path ()
 Returns the path to the parallel run file which specifies if parallel test environment is enabled and how many parallel runs to execute.
 
static get_behat_run_config_value ($key)
 Get config for parallel run.
 
static get_steps_list_config_filepath ()
 Returns the behat config file path used by the steps definition list.
 
static set_behat_run_config_value ($key, $value)
 Save/update config for parallel run.
 
static update_config_file ($component='', $testsrunner=true, $tags='', $themesuitewithallfeatures=false, $parallelruns=0, $run=0)
 Updates a config file.
 

Static Public Attributes

static bool $autoprofileconversion = false
 Keep track of the automatic profile conversion.
 
static behat_config_util $behatconfigutil = null
 keep object of behat_config_util for use.
 

Detailed Description

Behat configuration manager.

Creates/updates Behat config files getting tests and steps from Moodle codebase

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

Member Function Documentation

◆ create_parallel_site_links()

static behat_config_manager::create_parallel_site_links ( $fromrun,
$torun )
staticfinal

Create parallel site links.

Parameters
int$fromrunfirst run
int$torunlast run.
Return values
booltrue for sucess, else false.

◆ drop_parallel_site_links()

static behat_config_manager::drop_parallel_site_links ( )
staticfinal

Drops parallel site links.

Return values
booltrue on success else false.

◆ get_behat_cli_config_filepath()

static behat_config_manager::get_behat_cli_config_filepath ( $runprocess = 0)
static

Returns the behat config file path used by the behat cli command.

Parameters
int$runprocessRunprocess.
Return values
string

◆ get_behat_run_config_file_path()

static behat_config_manager::get_behat_run_config_file_path ( )
staticfinal

Returns the path to the parallel run file which specifies if parallel test environment is enabled and how many parallel runs to execute.

Return values
string

◆ get_behat_run_config_value()

static behat_config_manager::get_behat_run_config_value ( $key)
staticfinal

Get config for parallel run.

Parameters
string$keyKey to store
Return values
string|int|arrayvalue which is stored.

◆ get_steps_list_config_filepath()

static behat_config_manager::get_steps_list_config_filepath ( )
static

Returns the behat config file path used by the steps definition list.

Return values
string

◆ set_behat_run_config_value()

static behat_config_manager::set_behat_run_config_value ( $key,
$value )
staticfinal

Save/update config for parallel run.

Parameters
string$keyKey to store
string | int | array$valueto store.

◆ update_config_file()

static behat_config_manager::update_config_file ( $component = '',
$testsrunner = true,
$tags = '',
$themesuitewithallfeatures = false,
$parallelruns = 0,
$run = 0 )
static

Updates a config file.

The tests runner and the steps definitions list uses different config files to avoid problems with concurrent executions.

The steps definitions list can be filtered by component so it's behat.yml is different from the $CFG->dirroot one.

Parameters
string$componentRestricts the obtained steps definitions to the specified component
string$testsrunnerIf the config file will be used to run tests
string$tagsfeatures files including tags.
bool$themesuitewithallfeaturesif only theme specific features need to be included in the suite.
int$parallelrunsnumber of parallel runs.
int$runcurrent run for which config needs to be updated.
Return values
void

Member Data Documentation

◆ $autoprofileconversion

bool behat_config_manager::$autoprofileconversion = false
static

Keep track of the automatic profile conversion.

So we can notify user.


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