PHP Class SimpleScorer, simpletest

@package SimpleTest
Show file Open project: simpletest/simpletest Class Usage Examples

Public Methods

Method Description
__construct ( ) Starts the test run with no results.
createInvoker ( SimpleInvoker $invoker ) : SimpleInvoker Can wrap the invoker in preperation for running a test.
getExceptionCount ( ) : integer Accessor for the number of untrapped errors so far.
getFailCount ( ) : integer Accessor for the number of fails so far.
getPassCount ( ) : integer Accessor for the number of passes so far.
getStatus ( ) : boolean Accessor for current status.
makeDry ( boolean $is_dry = true ) Signals that the next evaluation will be a dry run.
paintCaseEnd ( string $test_name ) Paints the end of a test case.
paintCaseStart ( string $test_name ) Paints the start of a test case.
paintError ( string $message ) Deals with PHP 4 throwing an error.
paintException ( Exception $exception ) Deals with PHP 5 throwing an exception.
paintFail ( string $message ) Increments the fail count.
paintFormattedMessage ( string $message ) Paints a formatted ASCII message such as a privateiable dump.
paintGroupEnd ( string $test_name ) Paints the end of a group test.
paintGroupStart ( string $test_name, integer $size ) Paints the start of a group test.
paintMessage ( string $message ) Paints a simple supplementary message.
paintMethodEnd ( string $test_name ) Paints the end of a test method.
paintMethodStart ( string $test_name ) Paints the start of a test method.
paintPass ( string $message ) Increments the pass count.
paintSignal ( string $type, mixed $payload ) By default just ignores user generated events.
paintSkip ( string $message ) Prints the message for skipping tests.
shouldInvoke ( string $test_case_name, string $method ) The reporter has a veto on what should be run.

Method Details

__construct() public method

Starts the test run with no results.
public __construct ( )

createInvoker() public method

Can wrap the invoker in preperation for running a test.
public createInvoker ( SimpleInvoker $invoker ) : SimpleInvoker
$invoker SimpleInvoker Individual test runner.
return SimpleInvoker Wrapped test runner.

getExceptionCount() public method

Accessor for the number of untrapped errors so far.
public getExceptionCount ( ) : integer
return integer Number of exceptions.

getFailCount() public method

Accessor for the number of fails so far.
public getFailCount ( ) : integer
return integer Number of fails.

getPassCount() public method

Accessor for the number of passes so far.
public getPassCount ( ) : integer
return integer Number of passes.

getStatus() public method

Will be false if there have been any failures or exceptions. Used for command line tools.
public getStatus ( ) : boolean
return boolean True if no failures.

makeDry() public method

That is, the structure events will be recorded, but no tests will be run.
public makeDry ( boolean $is_dry = true )
$is_dry boolean Dry run if true.

paintCaseEnd() public method

Paints the end of a test case.
public paintCaseEnd ( string $test_name )
$test_name string Name of test or other label.

paintCaseStart() public method

Paints the start of a test case.
public paintCaseStart ( string $test_name )
$test_name string Name of test or other label.

paintError() public method

Deals with PHP 4 throwing an error.
public paintError ( string $message )
$message string Text of error formatted by the test case.

paintException() public method

Deals with PHP 5 throwing an exception.
public paintException ( Exception $exception )
$exception Exception The actual exception thrown.

paintFail() public method

Increments the fail count.
public paintFail ( string $message )
$message string Message is ignored.

paintFormattedMessage() public method

Paints a formatted ASCII message such as a privateiable dump.
public paintFormattedMessage ( string $message )
$message string Text to display.

paintGroupEnd() public method

Paints the end of a group test.
public paintGroupEnd ( string $test_name )
$test_name string Name of test or other label.

paintGroupStart() public method

Paints the start of a group test.
public paintGroupStart ( string $test_name, integer $size )
$test_name string Name of test or other label.
$size integer Number of test cases starting.

paintMessage() public method

Paints a simple supplementary message.
public paintMessage ( string $message )
$message string Text to display.

paintMethodEnd() public method

Paints the end of a test method.
public paintMethodEnd ( string $test_name )
$test_name string Name of test or other label.

paintMethodStart() public method

Paints the start of a test method.
public paintMethodStart ( string $test_name )
$test_name string Name of test or other label.

paintPass() public method

Increments the pass count.
public paintPass ( string $message )
$message string Message is ignored.

paintSignal() public method

By default just ignores user generated events.
public paintSignal ( string $type, mixed $payload )
$type string Event type as text.
$payload mixed Message or object.

paintSkip() public method

Prints the message for skipping tests.
public paintSkip ( string $message )
$message string Text of skip condition.

shouldInvoke() public method

The reporter has a veto on what should be run.
public shouldInvoke ( string $test_case_name, string $method )
$test_case_name string name of test case.
$method string Name of test method.