Class SimpleRunner

Description

The standard runner. Will run every method starting with test as well as the setUp() and tearDown() before and after each test method. Basically the Mediator pattern.

Located in /libraries/pear/simpletest/simple_test.php (line 31)


	
			
Direct descendents
Class Description
 class SimpleErrorTrappingRunner Extension that traps errors into an error queue.
Variable Summary
 mixed $_scorer
 mixed $_test_case
Method Summary
 SimpleRunner SimpleRunner (SimpleTestCase &$test_case, SimpleScorer &$scorer)
 void invoke (string $method)
 void paintError (string $message)
 void paintException (Exception $exception)
 void paintFail (string $message)
 void paintFormattedMessage (string $message)
 void paintMessage (string $message)
 void paintMethodEnd (string $test_name)
 void paintMethodStart (string $test_name)
 void paintPass (string $message)
 boolean paintSignal (string $type, mixed &$payload)
 void run (SimpleTest $test_case, string $method)
 boolean _isConstructor (string $method)
 boolean _isTest (string $method)
Variables
mixed $_scorer (line 33)
mixed $_test_case (line 32)
Methods
Constructor SimpleRunner (line 40)

Takes in the test case and reporter to mediate between.

SimpleRunner SimpleRunner (SimpleTestCase &$test_case, SimpleScorer &$scorer)
invoke (line 106)

Invokes a test method and buffered with setUp() and tearDown() calls.

  • access: public
void invoke (string $method)
  • string $method: Test method to call.

Redefined in descendants as:
paintError (line 156)

Chains to the wrapped reporter.

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

Chains to the wrapped reporter.

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

Chains to the wrapped reporter.

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

Chains to the wrapped reporter.

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

Chains to the wrapped reporter.

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

Paints the end of a test method.

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

Paints the start of a test method.

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

Chains to the wrapped reporter.

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

Chains to the wrapped reporter.

  • return: Should return false if this type of signal should fail the test suite.
  • access: public
boolean paintSignal (string $type, mixed &$payload)
  • string $type: Event type as text.
  • mixed $payload: Message or object.
run (line 60)

Runs the test methods in the test case.

  • access: public
void run (SimpleTest $test_case, string $method)
  • SimpleTest $test_case: Test case to run test on.
  • string $method: Name of test method.
_getTestCase (line 50)

Accessor for test case being run.

  • return: Test case.
  • access: protected
SimpleTestCase &_getTestCase ()
_isConstructor (line 82)

Tests to see if the method is the constructor and so should be ignored.

  • return: True if constructor.
  • access: protected
boolean _isConstructor (string $method)
  • string $method: Method name to try.
_isTest (line 96)

Tests to see if the method is a test that should be run. Currently any method that starts with 'test' is a candidate.

  • return: True if test method.
  • access: protected
boolean _isTest (string $method)
  • string $method: Method name to try.

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