Moodle  2.2.1
http://www.collinsharper.com
SimpleTest Class Reference
Inheritance diagram for SimpleTest:

Public Member Functions

 setMockBaseClass ($mock_base)
 getMockBaseClass ()
 useProxy ($proxy, $username=false, $password=false)
 getDefaultProxy ()
 getDefaultProxyUsername ()
 getDefaultProxyPassword ()

Static Public Member Functions

 getVersion ()
 ignore ($class)
 ignoreParentsIfIgnored ($classes)
 prefer (&$object)
preferred ($classes)
 isIgnored ($class)
_getRegistry ()
getContext ()
 _getDefaults ()

Detailed Description

Definition at line 27 of file simpletest.php.


Member Function Documentation

_getDefaults ( ) [static]

Constant default values.

Returns:
hash All registry defaults. private

Definition at line 234 of file simpletest.php.

Here is the caller graph for this function:

& _getRegistry ( ) [static]

Accessor for global registry of options.

Returns:
hash All stored values. private

Definition at line 205 of file simpletest.php.

Here is the call graph for this function:

Here is the caller graph for this function:

& getContext ( ) [static]

Accessor for the context of the current test run.

Returns:
SimpleTestContext Current test run. public

Definition at line 220 of file simpletest.php.

Here is the caller graph for this function:

Accessor for default proxy host.

Returns:
string Proxy URL. public

Reimplemented in SimpleTestOptions.

Definition at line 174 of file simpletest.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Accessor for default proxy password.

Returns:
string Proxy password for authentication. public

Reimplemented in SimpleTestOptions.

Definition at line 194 of file simpletest.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Accessor for default proxy username.

Returns:
string Proxy username for authentication. public

Reimplemented in SimpleTestOptions.

Definition at line 184 of file simpletest.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Deprecated:

Reimplemented in SimpleTestOptions.

Definition at line 147 of file simpletest.php.

Here is the call graph for this function:

getVersion ( ) [static]

Reads the SimpleTest version from the release file.

Returns:
string Version string.

public

Reimplemented in SimpleTestOptions.

Definition at line 35 of file simpletest.php.

ignore ( class) [static]

Sets the name of a test case to ignore, usually because the class is an abstract case that should not be run. Once PHP4 is dropped this will disappear as a public method and "abstract" will rule.

Parameters:
string$classAdd a class to ignore.

public

Reimplemented in SimpleTestOptions.

Definition at line 49 of file simpletest.php.

Here is the call graph for this function:

Here is the caller graph for this function:

ignoreParentsIfIgnored ( classes) [static]

Scans the now complete ignore list, and adds all parent classes to the list. If a class is not a runnable test case, then it's parents wouldn't be either. This is syntactic sugar to cut down on ommissions of ignore()'s or missing abstract declarations. This cannot be done whilst loading classes wiithout forcing a particular order on the class declarations and the ignore() calls. It's just nice to have the ignore() calls at the top of the file before the actual declarations.

Parameters:
array$classesClass names of interest.

public

Definition at line 69 of file simpletest.php.

Here is the call graph for this function:

isIgnored ( class) [static]

Test to see if a test case is in the ignore list. Quite obviously the ignore list should be a separate object and will be one day. This method is internal to SimpleTest. Don't use it.

Parameters:
string$classClass name to test.
Returns:
boolean True if should not be run. public

Reimplemented in SimpleTestOptions.

Definition at line 131 of file simpletest.php.

Here is the call graph for this function:

Here is the caller graph for this function:

prefer ( &$  object) [static]

Puts the object to the global pool of 'preferred' objects which can be retrieved with SimpleTest :: preferred() method. Instances of the same class are overwritten.

Parameters:
object$objectPreferred object

public

See also:
preferred()

Definition at line 90 of file simpletest.php.

Here is the call graph for this function:

& preferred ( classes) [static]

Retrieves 'preferred' objects from global pool. Class filter can be applied in order to retrieve the object of the specific class

Parameters:
array | string$classesAllowed classes or interfaces.

public

Returns:
array|object|null
See also:
prefer()

Definition at line 105 of file simpletest.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setMockBaseClass ( mock_base)
Deprecated:

Reimplemented in SimpleTestOptions.

Definition at line 139 of file simpletest.php.

Here is the call graph for this function:

useProxy ( proxy,
username = false,
password = false 
)

Sets proxy to use on all requests for when testing from behind a firewall. Set host to false to disable. This will take effect if there are no other proxy settings.

Parameters:
string$proxyProxy host as URL.
string$usernameProxy username for authentication.
string$passwordProxy password for authentication. public

Reimplemented in SimpleTestOptions.

Definition at line 162 of file simpletest.php.

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations