Class SimpleErrorQueue

Description

Error queue used to record trapped errors.

Located in /errors.php (line 67)


	
			
Method Summary
 static String getSeverityAsString ($severity $severity)
 SimpleErrorQueue __construct ()
 void add (integer $severity, string $content, string $filename, integer $line)
 void clear ()
 void expectError (SimpleExpectation $expected, string $message)
 mixed extract ()
 void setTestCase (SimpleTestCase $test)
 void tally ()
 void testLatestError (integer $severity, string $content, string $filename, integer $line)
Methods
static getSeverityAsString (line 196)

Converts an error code into it's string representation.

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

Starts with an empty queue.

SimpleErrorQueue __construct ()
add (line 119)

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.
clear (line 84)

Discards the contents of the error queue.

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

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 170)

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 ()
extractExpectation (line 182)

Pulls the earliest expectation from the queue.

  • return: False if none.
  • access: protected
SimpleExpectation extractExpectation ()
setTestCase (line 94)

Sets the currently running test case.

  • access: public
void setTestCase (SimpleTestCase $test)
tally (line 129)

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

  • access: public
void tally ()
testLatestError (line 148)

Tests the error against the most recent expected error.

  • access: protected
void testLatestError (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.

Documentation generated on Sun, 31 Oct 2010 16:31:22 -0500 by phpDocumentor 1.4.3