Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
behat_context_helper Class Reference

Static Public Member Functions

static escape ($label)
 Translates string to XPath literal. More...
 
static get ($classname)
 Gets the required context. More...
 
static get_component_context (string $component)
 Get the context for the specified component or subsystem. More...
 
static has_context (string $classname)
 Return whether there is a context of the specified classname. More...
 
static set_environment (Environment $environment)
 Sets behat environment. More...
 
static set_session (Environment $environment)
 Sets the browser session. More...
 

Static Protected Member Functions

static get_theme_override (string $classname)
 Check for any theme override of the specified class name. More...
 

Static Protected Attributes

static Environment $environment = null
 Behat environment.
 
static Escaper::escapeLiteral $escaper
 
static array $nonexistingcontexts = array()
 keep track of nonexisting contexts, to avoid exception tracking.
 

Member Function Documentation

◆ escape()

static behat_context_helper::escape (   $label)
static

Translates string to XPath literal.

Parameters
string$labellabel to escape
Return values
stringescaped string.

◆ get()

static behat_context_helper::get (   $classname)
static

Gets the required context.

Getting a context you get access to all the steps that uses direct API calls; steps returning step chains can not be executed like this.

Exceptions
Behat

◆ get_component_context()

static behat_context_helper::get_component_context ( string  $component)
static

Get the context for the specified component or subsystem.

Parameters
string$componentThe component or subsystem to find the context for
Return values
behat_base|null

◆ get_theme_override()

static behat_context_helper::get_theme_override ( string  $classname)
staticprotected

Check for any theme override of the specified class name.

Parameters
string$classname
Return values
string|null

◆ has_context()

static behat_context_helper::has_context ( string  $classname)
static

Return whether there is a context of the specified classname.

Parameters
string$classname
Return values
bool

◆ set_environment()

static behat_context_helper::set_environment ( Environment  $environment)
static

Sets behat environment.

Parameters
Environment$environment
Return values
void

◆ set_session()

static behat_context_helper::set_session ( Environment  $environment)
static

Sets the browser session.

Parameters
Environment$environment
Return values
void
Deprecated:
since 3.2 MDL-55072 - please use behat_context_helper::set_environment()
Todo:
MDL-55365 This will be deleted in Moodle 3.6.

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