[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/behat/classes/ -> behat_command.php (summary)

Behat command utils

Copyright: 2012 David Monllaó
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 250 lines (8 kb)
Included or required: 5 times
Referenced: 0 times
Includes or requires: 1 file
 lib/behat/lib.php

Defines 1 class

behat_command:: (6 methods):
  get_behat_dir()
  get_behat_command()
  run()
  behat_setup_problem()
  are_behat_dependencies_installed()
  output_msg()


Class: behat_command  - X-Ref

Behat command related utils

get_behat_dir($runprocess = 0)   X-Ref
Ensures the behat dir exists in moodledata

param: int $runprocess run process for which behat dir is returned.
return: string Full path

get_behat_command($custombyterm = false, $parallerun = false, $absolutepath = false)   X-Ref
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).

param: bool $custombyterm  If the provided command should depend on the terminal where it runs
param: bool $parallelrun If parallel run is installed.
param: bool $absolutepath return command with absolute path.
return: string

run($options = '')   X-Ref
Runs behat command with provided options

Execution continues when the process finishes

param: string $options  Defaults to '' so tests would be executed
return: array            CLI command outputs [0] => string, [1] => integer

behat_setup_problem()   X-Ref
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: int Error code or 0 if all ok

are_behat_dependencies_installed()   X-Ref
Has the site installed composer.

return: bool

output_msg($msg)   X-Ref
Outputs a message.

Used in CLI + web UI methods. Stops the
execution in web.

param: string $msg
return: void



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1