SimpleScorer Class Reference

Inheritance diagram for SimpleScorer:
[legend]

List of all members.


Public Member Functions

 SimpleScorer ()
 makeDry ($is_dry=true)
 shouldInvoke ($test_case_name, $method)
createInvoker (&$invoker)
 getStatus ()
 paintGroupStart ($test_name, $size)
 paintGroupEnd ($test_name)
 paintCaseStart ($test_name)
 paintCaseEnd ($test_name)
 paintMethodStart ($test_name)
 paintMethodEnd ($test_name)
 paintPass ($message)
 paintFail ($message)
 paintError ($message)
 paintException ($exception)
 paintSkip ($message)
 getPassCount ()
 getFailCount ()
 getExceptionCount ()
 paintMessage ($message)
 paintFormattedMessage ($message)
 paintSignal ($type, $payload)

Public Attributes

 $_passes
 $_fails
 $_exceptions
 $_is_dry_run


Detailed Description

Definition at line 12 of file scorer.php.


Member Function Documentation

SimpleScorer::SimpleScorer (  ) 

Starts the test run with no results. public

Definition at line 22 of file scorer.php.

Referenced by SimpleReporter::SimpleReporter().

SimpleScorer::makeDry ( is_dry = true  ) 

Signals that the next evaluation will be a dry run. That is, the structure events will be recorded, but no tests will be run.

Parameters:
boolean $is_dry Dry run if true. public

Definition at line 36 of file scorer.php.

SimpleScorer::shouldInvoke ( test_case_name,
method 
)

The reporter has a veto on what should be run.

Parameters:
string $test_case_name name of test case.
string $method Name of test method. public

Definition at line 46 of file scorer.php.

& SimpleScorer::createInvoker ( &$  invoker  ) 

Can wrap the invoker in preperation for running a test.

Parameters:
SimpleInvoker $invoker Individual test runner.
Returns:
SimpleInvoker Wrapped test runner. public

Definition at line 57 of file scorer.php.

SimpleScorer::getStatus (  ) 

Accessor for current status. Will be false if there have been any failures or exceptions. Used for command line tools.

Returns:
boolean True if no failures. public

Definition at line 68 of file scorer.php.

SimpleScorer::paintGroupStart ( test_name,
size 
)

Paints the start of a group test.

Parameters:
string $test_name Name of test or other label.
integer $size Number of test cases starting. public

Reimplemented in SimpleReporter, and XmlReporter.

Definition at line 81 of file scorer.php.

SimpleScorer::paintGroupEnd ( test_name  ) 

Paints the end of a group test.

Parameters:
string $test_name Name of test or other label. public

Reimplemented in DrupalReporter, SimpleReporter, and XmlReporter.

Definition at line 88 of file scorer.php.

SimpleScorer::paintCaseStart ( test_name  ) 

Paints the start of a test case.

Parameters:
string $test_name Name of test or other label. public

Reimplemented in DrupalReporter, SimpleReporter, and XmlReporter.

Definition at line 95 of file scorer.php.

SimpleScorer::paintCaseEnd ( test_name  ) 

Paints the end of a test case.

Parameters:
string $test_name Name of test or other label. public

Reimplemented in DrupalReporter, SimpleReporter, and XmlReporter.

Definition at line 102 of file scorer.php.

SimpleScorer::paintMethodStart ( test_name  ) 

Paints the start of a test method.

Parameters:
string $test_name Name of test or other label. public

Reimplemented in SimpleReporter, and XmlReporter.

Definition at line 109 of file scorer.php.

SimpleScorer::paintMethodEnd ( test_name  ) 

Paints the end of a test method.

Parameters:
string $test_name Name of test or other label. public

Reimplemented in SimpleReporter, and XmlReporter.

Definition at line 116 of file scorer.php.

SimpleScorer::paintPass ( message  ) 

Increments the pass count.

Parameters:
string $message Message is ignored. public

Reimplemented in XmlReporter.

Definition at line 123 of file scorer.php.

SimpleScorer::paintFail ( message  ) 

Increments the fail count.

Parameters:
string $message Message is ignored. public

Reimplemented in HtmlReporter, TextReporter, and XmlReporter.

Definition at line 132 of file scorer.php.

SimpleScorer::paintError ( message  ) 

Deals with PHP 4 throwing an error.

Parameters:
string $message Text of error formatted by the test case. public

Reimplemented in DrupalReporter, HtmlReporter, TextReporter, and XmlReporter.

Definition at line 142 of file scorer.php.

SimpleScorer::paintException ( exception  ) 

Deals with PHP 5 throwing an exception.

Parameters:
Exception $exception The actual exception thrown. public

Reimplemented in HtmlReporter, TextReporter, and XmlReporter.

Definition at line 151 of file scorer.php.

SimpleScorer::paintSkip ( message  ) 

Prints the message for skipping tests.

Parameters:
string $message Text of skip condition. public

Reimplemented in HtmlReporter, TextReporter, and XmlReporter.

Definition at line 160 of file scorer.php.

SimpleScorer::getPassCount (  ) 

Accessor for the number of passes so far.

Returns:
integer Number of passes. public

Definition at line 167 of file scorer.php.

Referenced by TextReporter::paintFooter(), HtmlReporter::paintFooter(), DrupalReporter::paintFooter(), and DrupalReporter::paintGroupEnd().

SimpleScorer::getFailCount (  ) 

Accessor for the number of fails so far.

Returns:
integer Number of fails. public

Definition at line 176 of file scorer.php.

Referenced by TextReporter::paintFail(), TextReporter::paintFooter(), HtmlReporter::paintFooter(), DrupalReporter::paintFooter(), and DrupalReporter::paintGroupEnd().

SimpleScorer::getExceptionCount (  ) 

Accessor for the number of untrapped errors so far.

Returns:
integer Number of exceptions. public

Definition at line 186 of file scorer.php.

Referenced by TextReporter::paintError(), TextReporter::paintException(), TextReporter::paintFooter(), HtmlReporter::paintFooter(), DrupalReporter::paintFooter(), and DrupalReporter::paintGroupEnd().

SimpleScorer::paintMessage ( message  ) 

Paints a simple supplementary message.

Parameters:
string $message Text to display. public

Reimplemented in XmlReporter.

Definition at line 195 of file scorer.php.

SimpleScorer::paintFormattedMessage ( message  ) 

Paints a formatted ASCII message such as a variable dump.

Parameters:
string $message Text to display. public

Reimplemented in HtmlReporter, TextReporter, and XmlReporter.

Definition at line 203 of file scorer.php.

SimpleScorer::paintSignal ( type,
payload 
)

By default just ignores user generated events.

Parameters:
string $type Event type as text.
mixed $payload Message or object. public

Definition at line 211 of file scorer.php.


Member Data Documentation

SimpleScorer::$_passes

Definition at line 13 of file scorer.php.

SimpleScorer::$_fails

Definition at line 14 of file scorer.php.

SimpleScorer::$_exceptions

Definition at line 15 of file scorer.php.

SimpleScorer::$_is_dry_run

Definition at line 16 of file scorer.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