SimpleStackTrace Class Reference

List of all members.


Public Member Functions

 SimpleStackTrace ($prefixes)
 traceMethod ($stack=false)
 _frameLiesWithinSimpleTestFolder ($frame)
 _frameMatchesPrefix ($frame)
 _captureTrace ()

Public Attributes

 $_prefixes


Detailed Description

Interrogates the stack trace to recover the failure point.

Definition at line 292 of file simpletest.php.


Member Function Documentation

SimpleStackTrace::SimpleStackTrace ( prefixes  ) 

Stashes the list of target prefixes.

Parameters:
array $prefixes List of method prefixes to search for.

Definition at line 300 of file simpletest.php.

SimpleStackTrace::traceMethod ( stack = false  ) 

Extracts the last method name that was not within Simpletest itself. Captures a stack trace if none given.

Parameters:
array $stack List of stack frames.
Returns:
string Snippet of test report with line number and file. public

Definition at line 312 of file simpletest.php.

References _captureTrace(), _frameLiesWithinSimpleTestFolder(), and _frameMatchesPrefix().

Here is the call graph for this function:

SimpleStackTrace::_frameLiesWithinSimpleTestFolder ( frame  ) 

Test to see if error is generated by SimpleTest itself.

Parameters:
array $frame PHP stack frame.
Returns:
boolean True if a SimpleTest file. private

Definition at line 331 of file simpletest.php.

Referenced by traceMethod().

SimpleStackTrace::_frameMatchesPrefix ( frame  ) 

Tries to determine if the method call is an assert, etc.

Parameters:
array $frame PHP stack frame.
Returns:
boolean True if matches a target. private

Definition at line 349 of file simpletest.php.

Referenced by traceMethod().

SimpleStackTrace::_captureTrace (  ) 

Grabs a current stack trace.

Returns:
array Fulle trace. private

Definition at line 363 of file simpletest.php.

Referenced by traceMethod().


Member Data Documentation

SimpleStackTrace::$_prefixes

Definition at line 293 of file simpletest.php.


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

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