[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/testing/ -> lib.php (summary)

Testing general functions Note: these functions must be self contained and must not rely on any library or include

Copyright: 2012 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 240 lines (7 kb)
Included or required: 6 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  testing_cli_argument_path()
  testing_fix_file_permissions()
  testing_is_cygwin()
  testing_is_mingw()
  testing_initdataroot()
  testing_error()
  testing_update_composer_dependencies()

Functions
Functions that are not part of a class:

testing_cli_argument_path($moodlepath)   X-Ref
Returns relative path against current working directory,
to be used for shell execution hints.

param: string $moodlepath starting with "/", ex: "/admin/tool/cli/init.php"
return: string path relative to current directory or absolute path

testing_fix_file_permissions($file)   X-Ref
Try to change permissions to $CFG->dirroot or $CFG->dataroot if possible

param: string $file
return: bool success

testing_is_cygwin()   X-Ref
Find out if running under Cygwin on Windows.

return: bool

testing_is_mingw()   X-Ref
Returns whether a mingw CLI is running.

MinGW sets $_SERVER['TERM'] to cygwin, but it
can not run .bat files; this function may be useful
when we need to output proposed commands to users
using Windows CLI interfaces.

return: bool

testing_initdataroot($dataroot, $framework)   X-Ref
Mark empty dataroot to be used for testing.

param: string $dataroot  The dataroot directory
param: string $framework The test framework
return: void

testing_error($errorcode, $text = '')   X-Ref
Prints an error and stops execution

param: integer $errorcode
param: string $text
return: void exits

testing_update_composer_dependencies()   X-Ref
Updates the composer installer and the dependencies.

return: void exit() if something goes wrong



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