Class SimpleErrorQueue

Description

Error queue used to record trapped errors.

Located in /errors.php (line 74)


	
			
Variable Summary
Method Summary
 static String getSeverityAsString ($severity $severity)
 SimpleErrorQueue SimpleErrorQueue ()
 void add (integer $severity, string $content, string $filename, integer $line)
 void assertError ( $expected,  $message)
 void assertNoErrors ( $message)
 void clear ()
 void expectError (SimpleExpectation $expected, string $message)
 mixed extract ()
 void setTestCase ( &$test, SimpleTestCase $test)
 void tally ()
Variables
mixed $_expectation_queue (line 76)
mixed $_queue (line 75)
mixed $_test (line 77)
mixed $_using_expect_style = false (line 78)
Methods
static getSeverityAsString (line 237)

Converts an error code into it's string representation.

  • return: version of error code.
  • access: public
static String getSeverityAsString ($severity $severity)
  • $severity $severity: PHP integer error code.
Constructor SimpleErrorQueue (line 83)

Starts with an empty queue.

SimpleErrorQueue SimpleErrorQueue ()
add (line 127)

Adds an error to the front of the queue.

  • access: public
void add (integer $severity, string $content, string $filename, integer $line)
  • integer $severity: PHP error code.
  • string $content: Text of error.
  • string $filename: File error occoured in.
  • integer $line: Line number of error.
assertError (line 216)
  • deprecated:
void assertError ( $expected,  $message)
  • $expected
  • $message
assertNoErrors (line 206)
  • deprecated:
void assertNoErrors ( $message)
  • $message
clear (line 91)

Discards the contents of the error queue.

  • access: public
void clear ()
expectError (line 114)

Sets up an expectation of an error. If this is not fulfilled at the end of the test, a failure will occour. If the error does happen, then this will cancel it out and send a pass message.

  • access: public
void expectError (SimpleExpectation $expected, string $message)
  • SimpleExpectation $expected: Expected error match.
  • string $message: Message to display.
extract (line 184)

Pulls the earliest error from the queue.

  • return: False if none, or a list of error information. Elements are: severity as the PHP error code, the error message, the file with the error, the line number and a list of PHP super global arrays.
  • access: public
mixed extract ()
setTestCase (line 101)

Sets the currently running test case.

  • access: public
void setTestCase ( &$test, SimpleTestCase $test)
tally (line 143)

Any errors still in the queue are sent to the test case. Any unfulfilled expectations trigger failures.

  • access: public
void tally ()

Documentation generated on Sun, 04 May 2008 09:21:32 -0500 by phpDocumentor 1.3.0