[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

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

Utils for behat-related stuff

Copyright: 2012 David Monllaó
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 293 lines (9 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 5 files
 lib/behat/classes/behat_config_manager.php
 lib/behat/classes/behat_command.php
 lib/filelib.php
 lib/testing/classes/util.php
 lib/behat/lib.php

Defines 1 class

behat_util:: (9 methods):
  install_site()
  drop_site()
  is_server_running()
  test_environment_problem()
  start_test_mode()
  get_behat_status()
  stop_test_mode()
  is_test_mode_enabled()
  get_test_file_path()


Class: behat_util  - X-Ref

Init/reset utilities for Behat database and dataroot

install_site()   X-Ref
Installs a site using $CFG->dataroot and $CFG->prefix

return: void

drop_site()   X-Ref
Drops dataroot and remove test database tables

return: void

is_server_running()   X-Ref
Checks if $CFG->behat_wwwroot is available

return: bool

test_environment_problem()   X-Ref
Checks whether the test database and dataroot is ready
Stops execution if something went wrong

return: void

start_test_mode()   X-Ref
Enables test mode

It uses CFG->behat_dataroot

Starts the test mode checking the composer installation and
the test environment and updating the available
features and steps definitions.

Stores a file in dataroot/behat to allow Moodle to switch
to the test environment when using cli-server.
return: void

get_behat_status()   X-Ref
Returns the status of the behat test environment

return: int Error code

stop_test_mode()   X-Ref
Disables test mode

return: void

is_test_mode_enabled()   X-Ref
Checks whether test environment is enabled or disabled

To check is the current script is running in the test
environment

return: bool

get_test_file_path()   X-Ref
Returns the path to the file which specifies if test environment is enabled

return: string



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1