Helper to get behat contexts.
More...
|
static | escape ($label) |
| Translates string to XPath literal.
|
|
static | get ($classname) |
| Gets the required context.
|
|
static | get_component_context (string $component) |
| Get the context for the specified component or subsystem.
|
|
static | get_prefixed_contexts (string $prefix) |
| Find all Behat contexts which match the specified context class name prefix.
|
|
static | has_context (string $classname) |
| Return whether there is a context of the specified classname.
|
|
static | set_environment (Environment $environment) |
| Sets behat environment.
|
|
|
static | get_theme_override (string $classname) |
| Check for any theme override of the specified class name.
|
|
|
static Environment | $environment = null |
| Behat environment.
|
|
static Escaper::escapeLiteral | $escaper |
|
static array | $nonexistingcontexts = array() |
| keep track of nonexisting contexts, to avoid exception tracking.
|
|
Helper to get behat contexts.
- Copyright
- 2014 David MonllaĆ³
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ escape()
static behat_context_helper::escape |
( |
| $label | ) |
|
|
static |
Translates string to XPath literal.
- Parameters
-
string | $label | label to escape |
- Return values
-
◆ 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\Behat\Context\Exception\ContextNotFoundException | |
- Parameters
-
string | $classname | Context identifier (the class name). |
- Return values
-
◆ get_component_context()
static behat_context_helper::get_component_context |
( |
string | $component | ) |
|
|
static |
Get the context for the specified component or subsystem.
- Parameters
-
string | $component | The component or subsystem to find the context for |
- Return values
-
◆ get_prefixed_contexts()
static behat_context_helper::get_prefixed_contexts |
( |
string | $prefix | ) |
|
|
static |
Find all Behat contexts which match the specified context class name prefix.
Moodle uses a consistent class naming scheme for all Behat contexts, whereby the context name is in the format:
behat_{component}
This method will return all contexts which match the specified prefix.
For example, to find all editors, you would pass in 'behat_editor', and this might return:
- Parameters
-
string | $prefix | The prefix to search for |
- Return values
-
Behat\Behat\Context\Context[] | |
◆ get_theme_override()
static behat_context_helper::get_theme_override |
( |
string | $classname | ) |
|
|
staticprotected |
Check for any theme override of the specified class name.
- Parameters
-
- Return values
-
◆ has_context()
static behat_context_helper::has_context |
( |
string | $classname | ) |
|
|
static |
Return whether there is a context of the specified classname.
- Parameters
-
- Return values
-
◆ set_environment()
static behat_context_helper::set_environment |
( |
Environment | $environment | ) |
|
|
static |
Sets behat environment.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file: