Abstract Class SimpleScorer

Description

Can recieve test events and display them. Display is achieved by making display methods available and visiting the incoming event.

  • abstract:

Located in /libraries/pear/simpletest/scorer.php (line 17)


	
			
Direct descendents
Class Description
 class SimpleReporter Recipient of generated test messages that can display page footers and headers. Also keeps track of the test nesting. This is the main base class on which to build the finished test (page based) displays.
Variable Summary
 mixed $_exceptions
 mixed $_fails
 mixed $_is_dry_run
 mixed $_passes
Method Summary
 SimpleScorer SimpleScorer ()
 integer getExceptionCount ()
 integer getFailCount ()
 integer getPassCount ()
 boolean getStatus ()
 void invoke (SimpleRunner &$runner, string $method)
 void makeDry ([mixed $is_dry = true])
 void paintCaseEnd (string $test_name)
 void paintCaseStart (string $test_name)
 void paintError (string $message)
 void paintException (Exception $exception)
 void paintFail (string $message)
 void paintFormattedMessage (string $message)
 void paintGroupEnd (string $test_name)
 void paintGroupStart (string $test_name, integer $size)
 void paintMessage (string $message)
 void paintMethodEnd (string $test_name)
 void paintMethodStart (string $test_name)
 void paintPass (string $message)
 void paintSignal (string $type, mixed &$payload)
Variables
mixed $_exceptions (line 20)
mixed $_fails (line 19)
mixed $_is_dry_run (line 21)
mixed $_passes (line 18)
Methods
Constructor SimpleScorer (line 27)

Starts the test run with no results.

  • access: public
SimpleScorer SimpleScorer ()
getExceptionCount (line 182)

Accessor for the number of untrapped errors so far.

  • return: Number of exceptions.
  • access: public
integer getExceptionCount ()
getFailCount (line 172)

Accessor for the number of fails so far.

  • return: Number of fails.
  • access: public
integer getFailCount ()
getPassCount (line 163)

Accessor for the number of passes so far.

  • return: Number of passes.
  • access: public
integer getPassCount ()
getStatus (line 64)

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

Used for command line tools.

  • return: True if no failures.
  • access: public
boolean getStatus ()
invoke (line 51)

Invokes a single test method on the test case.

This call back allows the reporter to decide if it actually wants to run the test.

  • access: public
void invoke (SimpleRunner &$runner, string $method)
  • SimpleRunner $runner: Test case to run test on.
  • string $method: Name of test method.
makeDry (line 39)

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

void makeDry ([mixed $is_dry = true])
paintCaseEnd (line 100)

Paints the end of a test case.

  • access: public
void paintCaseEnd (string $test_name)
  • string $test_name: Name of test or other label.

Redefined in descendants as:
paintCaseStart (line 92)

Paints the start of a test case.

  • access: public
void paintCaseStart (string $test_name)
  • string $test_name: Name of test or other label.

Redefined in descendants as:
paintError (line 144)

Deals with PHP 4 throwing an error.

  • access: public
void paintError (string $message)
  • string $message: Text of error formatted by the test case.
paintException (line 154)

Deals with PHP 5 throwing an exception This isn't really implemented yet.

  • access: public
void paintException (Exception $exception)
  • Exception $exception: Object thrown.

Redefined in descendants as:
paintFail (line 134)

Increments the fail count.

  • access: public
void paintFail (string $message)
  • string $message: Message is ignored.

Redefined in descendants as:
paintFormattedMessage (line 200)

Paints a formatted ASCII message such as a variable dump.

  • access: public
void paintFormattedMessage (string $message)
  • string $message: Text to display.

Redefined in descendants as:
paintGroupEnd (line 117)

Paints the end of a group test.

  • access: public
void paintGroupEnd (string $test_name)
  • string $test_name: Name of test or other label.

Redefined in descendants as:
paintGroupStart (line 109)

Paints the start of a group test.

  • access: public
void paintGroupStart (string $test_name, integer $size)
  • string $test_name: Name of test or other label.
  • integer $size: Number of test cases starting.

Redefined in descendants as:
paintMessage (line 191)

Paints a simple supplementary message.

  • access: public
void paintMessage (string $message)
  • string $message: Text to display.

Redefined in descendants as:
paintMethodEnd (line 84)

Paints the end of a test method.

  • access: public
void paintMethodEnd (string $test_name)
  • string $test_name: Name of test or other label.

Redefined in descendants as:
paintMethodStart (line 76)

Paints the start of a test method.

  • access: public
void paintMethodStart (string $test_name)
  • string $test_name: Name of test or other label.

Redefined in descendants as:
paintPass (line 125)

Increments the pass count.

  • access: public
void paintPass (string $message)
  • string $message: Message is ignored.

Redefined in descendants as:
paintSignal (line 209)

By default just ignores user generated events.

  • access: public
void paintSignal (string $type, mixed &$payload)
  • string $type: Event type as text.
  • mixed $payload: Message or object.

Redefined in descendants as:

Documentation generated on Fri, 11 Feb 2005 18:13:58 +0000 by phpDocumentor 1.3.0RC3