[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/tests_runner/lib/simpletest/ -> errors.php (summary)

base include file for SimpleTest

Version: $Id: errors.php 5999 2007-06-18 13:13:08Z pachanga $
File Size: 269 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

SimpleErrorTrappingInvoker:: (3 methods):
  SimpleErrorTrappingInvoker()
  invoke()
  after()

SimpleErrorQueue:: (12 methods):
  SimpleErrorQueue()
  setTestCase()
  add()
  _testLatestError()
  extract()
  extractExpectation()
  clear()
  assertNoErrors()
  assertError()
  expectError()
  getSeverityAsString()
  SimpleTestErrorHandler()


Class: SimpleErrorTrappingInvoker  - X-Ref

Extension that traps errors into an error queue.

SimpleErrorTrappingInvoker(&$invoker)   X-Ref
Stores the invoker to wrap.

param: SimpleInvoker $invoker  Test method runner.

invoke($method)   X-Ref
Invokes a test method and dispatches any
untrapped errors. Called back from
the visiting runner.

param: string $method    Test method to call.

after($method)   X-Ref
No description

Class: SimpleErrorQueue  - X-Ref

Singleton error queue used to record trapped
errors.

SimpleErrorQueue()   X-Ref
Starts with an empty queue.


setTestCase(&$test)   X-Ref
Sets the currently running test case.

param: SimpleTestCase $test    Test case to send messages to.

add($severity, $content, $filename, $line)   X-Ref
Adds an error to the front of the queue.

param: integer $severity       PHP error code.
param: string $content         Text of error.
param: string $filename        File error occoured in.
param: integer $line           Line number of error.

_testLatestError($severity, $content, $filename, $line)   X-Ref
Tests the error against the most recent expected
error.

param: integer $severity       PHP error code.
param: string $content         Text of error.
param: string $filename        File error occoured in.
param: integer $line           Line number of error.

extract()   X-Ref
Pulls the earliest error from the queue.

return: False if none, or a list of error

extractExpectation()   X-Ref
No description

clear()   X-Ref
Discards the contents of the error queue.


assertNoErrors($message)   X-Ref


assertError($expected, $message)   X-Ref


expectError($expected, $message)   X-Ref
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.

param: SimpleExpectation $expected    Expected error match.
param: string $message                Message to display.

getSeverityAsString($severity)   X-Ref
Converts an error code into it's string
representation.

param: $severity  PHP integer error code.
return: String version of error code.

SimpleTestErrorHandler($severity, $message, $filename = null, $line = null, $super_globals = null, $mask = null)   X-Ref
Error handler that simply stashes any errors into the global
error queue. Simulates the existing behaviour with respect to
logging errors, but this feature may be removed in future.

param: $severity        PHP error code.
param: $message         Text of error.
param: $filename        File error occoured in.
param: $line            Line number of error.
param: $super_globals   Hash of PHP super global arrays.



Generated: Sat Nov 22 03:48:54 2008 Cross-referenced by PHPXref 0.7