| [ Index ] |
PHP Cross Reference of Limb3 |
[Source view] [Print] [Project Stats]
Global state for SimpleTest and kicker script in future versions.
| Version: | $Id: simpletest.php 5999 2007-06-18 13:13:08Z pachanga $ |
| File Size: | 478 lines (16 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
SimpleTest:: (15 methods):
getVersion()
ignore()
ignoreParentsIfIgnored()
prefer()
preferred()
isIgnored()
setMockBaseClass()
getMockBaseClass()
useProxy()
getDefaultProxy()
getDefaultProxyUsername()
getDefaultProxyPassword()
_getRegistry()
getContext()
_getDefaults()
SimpleTestContext:: (6 methods):
clear()
setTest()
getTest()
setReporter()
getReporter()
get()
SimpleStackTrace:: (5 methods):
SimpleStackTrace()
traceMethod()
_frameLiesWithinSimpleTestFolder()
_frameMatchesPrefix()
_captureTrace()
SimpleTestOptions:: (9 methods):
getVersion()
ignore()
isIgnored()
setMockBaseClass()
getMockBaseClass()
useProxy()
getDefaultProxy()
getDefaultProxyUsername()
getDefaultProxyPassword()
Class: SimpleTest - X-Ref
Registry and test context. Includes a few| getVersion() X-Ref |
| Reads the SimpleTest version from the release file. return: string Version string. |
| ignore($class) X-Ref |
| 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. param: string $class Add a class to ignore. |
| ignoreParentsIfIgnored($classes) X-Ref |
| 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. param: array $classes Class names of interest. |
| prefer(&$object) X-Ref |
| 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. param: object $object Preferred object |
| preferred($classes) X-Ref |
| Retrieves 'preferred' objects from global pool. Class filter can be applied in order to retrieve the object of the specific class param: array|string $classes Allowed classes or interfaces. return: array|object|null |
| isIgnored($class) X-Ref |
| 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. param: string $class Class name to test. return: boolean True if should not be run. |
| setMockBaseClass($mock_base) X-Ref |
| getMockBaseClass() X-Ref |
| useProxy($proxy, $username = false, $password = false) X-Ref |
| 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. param: string $proxy Proxy host as URL. param: string $username Proxy username for authentication. param: string $password Proxy password for authentication. |
| getDefaultProxy() X-Ref |
| Accessor for default proxy host. return: string Proxy URL. |
| getDefaultProxyUsername() X-Ref |
| Accessor for default proxy username. return: string Proxy username for authentication. |
| getDefaultProxyPassword() X-Ref |
| Accessor for default proxy password. return: string Proxy password for authentication. |
| _getRegistry() X-Ref |
| Accessor for global registry of options. return: hash All stored values. |
| getContext() X-Ref |
| Accessor for the context of the current test run. return: SimpleTestContext Current test run. |
| _getDefaults() X-Ref |
| Constant default values. return: hash All registry defaults. |
Class: SimpleTestContext - X-Ref
Container for all components for a specific| clear() X-Ref |
| Clears down the current context. |
| setTest(&$test) X-Ref |
| Sets the current test case instance. This global instance can be used by the mock objects to send message to the test cases. param: SimpleTestCase $test Test case to register. |
| getTest() X-Ref |
| Accessor for currently running test case. return: SimpleTestCase Current test. |
| setReporter(&$reporter) X-Ref |
| Sets the current reporter. This global instance can be used by the mock objects to send messages. param: SimpleReporter $reporter Reporter to register. |
| getReporter() X-Ref |
| Accessor for current reporter. return: SimpleReporter Current reporter. |
| get($resource) X-Ref |
| Accessor for the Singleton resource. return: object Global resource. |
Class: SimpleStackTrace - X-Ref
Interrogates the stack trace to recover the| SimpleStackTrace($prefixes) X-Ref |
| Stashes the list of target prefixes. param: array $prefixes List of method prefixes |
| traceMethod($stack = false) X-Ref |
| Extracts the last method name that was not within Simpletest itself. Captures a stack trace if none given. param: array $stack List of stack frames. return: string Snippet of test report with line |
| _frameLiesWithinSimpleTestFolder($frame) X-Ref |
| Test to see if error is generated by SimpleTest itself. param: array $frame PHP stack frame. return: boolean True if a SimpleTest file. |
| _frameMatchesPrefix($frame) X-Ref |
| Tries to determine if the method call is an assert, etc. param: array $frame PHP stack frame. return: boolean True if matches a target. |
| _captureTrace() X-Ref |
| Grabs a current stack trace. return: array Fulle trace. |
Class: SimpleTestOptions - X-Ref
| getVersion() X-Ref |
| ignore($class) X-Ref |
| isIgnored($class) X-Ref |
| setMockBaseClass($mock_base) X-Ref |
| getMockBaseClass() X-Ref |
| useProxy($proxy, $username = false, $password = false) X-Ref |
| getDefaultProxy() X-Ref |
| getDefaultProxyUsername() X-Ref |
| getDefaultProxyPassword() X-Ref |
| Generated: Tue Oct 7 05:02:03 2008 | Cross-referenced by PHPXref 0.7 |