Behat command related utils.
More...
|
const | DOCS_URL = 'https://moodledev.io/general/development/tools/behat' |
| Docs url.
|
|
Behat command related utils.
- Copyright
- 2013 David MonllaĆ³
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ are_behat_dependencies_installed()
static behat_command::are_behat_dependencies_installed |
( |
| ) |
|
|
static |
Has the site installed composer.
- Return values
-
◆ behat_setup_problem()
static behat_command::behat_setup_problem |
( |
| ) |
|
|
static |
Checks if behat is set up and working.
Notifies failures both from CLI and web interface.
It checks behat dependencies have been installed and runs the behat help command to ensure it works as expected
- Return values
-
int | Error code or 0 if all ok |
◆ get_behat_command()
static behat_command::get_behat_command |
( |
| $custombyterm = false, |
|
|
| $parallerun = false, |
|
|
| $absolutepath = false ) |
|
staticfinal |
Returns the executable path.
Allows returning a customized command for cygwin when the command is just displayed, when using exec(), system() and friends we stay with DIRECTORY_SEPARATOR as they use the normal cmd.exe (in Windows).
- Parameters
-
bool | $custombyterm | If the provided command should depend on the terminal where it runs |
bool | $parallelrun | If parallel run is installed. |
bool | $absolutepath | return command with absolute path. |
- Return values
-
◆ get_behat_dir()
static behat_command::get_behat_dir |
( |
| $runprocess = 0 | ) |
|
|
static |
Ensures the behat dir exists in moodledata.
- Parameters
-
int | $runprocess | run process for which behat dir is returned. |
- Return values
-
◆ get_parent_behat_dir()
static behat_command::get_parent_behat_dir |
( |
| ) |
|
|
static |
Ensures the behat dir exists in moodledata.
- Return values
-
◆ output_msg()
static behat_command::output_msg |
( |
| $msg | ) |
|
|
staticprotected |
Outputs a message.
Used in CLI + web UI methods. Stops the execution in web.
- Parameters
-
- Return values
-
◆ run()
static behat_command::run |
( |
| $options = '' | ) |
|
|
staticfinal |
Runs behat command with provided options.
Execution continues when the process finishes
- Parameters
-
string | $options | Defaults to '' so tests would be executed |
- Return values
-
array | CLI command outputs [0] => string, [1] => integer |
The documentation for this class was generated from the following file:
- lib/behat/classes/behat_command.php