SimpleTest Class Reference

List of all members.


Public Member Functions

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

Static Public Member Functions

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


Detailed Description

Registry and test context. Includes a few global options that I'm slowly getting rid of.

Definition at line 20 of file simpletest.php.


Member Function Documentation

SimpleTest::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 $class Add a class to ignore.
public

Definition at line 30 of file simpletest.php.

References _getRegistry().

Referenced by ignoreParentsIfIgnored(), and SimpleFileLoader::selectRunnableTests().

Here is the call graph for this function:

SimpleTest::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 $classes Class names of interest.
public

Definition at line 50 of file simpletest.php.

References _getRegistry(), ignore(), and isIgnored().

Referenced by SimpleFileLoader::createSuiteFromClasses().

Here is the call graph for this function:

SimpleTest::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 $object Preferred object
public
See also:
preferred()

Definition at line 71 of file simpletest.php.

References _getRegistry().

Here is the call graph for this function:

& SimpleTest::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 $classes Allowed classes or interfaces.
public
Returns:
array|object|null
See also:
prefer()

Definition at line 86 of file simpletest.php.

References _getRegistry().

Referenced by DefaultReporter::DefaultReporter().

Here is the call graph for this function:

SimpleTest::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 $class Class name to test.
Returns:
boolean True if should not be run. public

Definition at line 112 of file simpletest.php.

References _getRegistry().

Referenced by SimpleFileLoader::createSuiteFromClasses(), and ignoreParentsIfIgnored().

Here is the call graph for this function:

SimpleTest::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 $proxy Proxy host as URL.
string $username Proxy username for authentication.
string $password Proxy password for authentication. public

Definition at line 127 of file simpletest.php.

References _getRegistry().

Here is the call graph for this function:

SimpleTest::getDefaultProxy (  ) 

Accessor for default proxy host.

Returns:
string Proxy URL. public

Definition at line 139 of file simpletest.php.

References _getRegistry().

Here is the call graph for this function:

SimpleTest::getDefaultProxyUsername (  ) 

Accessor for default proxy username.

Returns:
string Proxy username for authentication. public

Definition at line 149 of file simpletest.php.

References _getRegistry().

Here is the call graph for this function:

SimpleTest::getDefaultProxyPassword (  ) 

Accessor for default proxy password.

Returns:
string Proxy password for authentication. public

Definition at line 159 of file simpletest.php.

References _getRegistry().

Here is the call graph for this function:

& SimpleTest::_getRegistry (  )  [static]

Accessor for global registry of options.

Returns:
hash All stored values. private

Definition at line 170 of file simpletest.php.

References _getDefaults().

Referenced by getDefaultProxy(), getDefaultProxyPassword(), getDefaultProxyUsername(), ignore(), ignoreParentsIfIgnored(), isIgnored(), prefer(), preferred(), and useProxy().

Here is the call graph for this function:

& SimpleTest::getContext (  )  [static]

Accessor for the context of the current test run.

Returns:
SimpleTestContext Current test run. public

Definition at line 185 of file simpletest.php.

Referenced by SimpleErrorTrappingInvoker::_createErrorQueue(), SimpleExceptionTrappingInvoker::invoke(), SimpleTestCase::run(), and SimpleTestErrorHandler().

SimpleTest::_getDefaults (  )  [static]

Constant default values.

Returns:
hash All registry defaults. private

Definition at line 199 of file simpletest.php.

Referenced by _getRegistry().


The documentation for this class was generated from the following file:

Generated on Mon Jun 2 15:09:14 2008 for SimpleTest by  1.5.5