Class SelectiveReporter

Description

Runs just a single test group, a single case or even a single test within that case.

Located in /reporter.php (line 312)

SimpleReporterDecorator
   |
   --SelectiveReporter
Method Summary
 SelectiveReporter __construct (SimpleScorer $reporter, [string $just_this_case = false], [string $just_this_test = false])
 boolean isOn ()
 boolean matchesTestCase (string $test_case)
 void off ()
 void on ()
 void paintGroupEnd (string $test_case)
 void paintGroupStart (string $test_case, integer $size)
 boolean shouldInvoke (string $test_case, string $method)
 boolean shouldRunTest ( $test_case, string $method)
Variables

Inherited Variables

Inherited from SimpleReporterDecorator

SimpleReporterDecorator::$reporter
Methods
Constructor __construct (line 324)

Selects the test case or group to be run, and optionally a specific test.

SelectiveReporter __construct (SimpleScorer $reporter, [string $just_this_case = false], [string $just_this_test = false])
  • SimpleScorer $reporter: Reporter to receive events.
  • string $just_this_case: Only this case or group will run.
  • string $just_this_test: Only this test method will run.

Redefinition of:
SimpleReporterDecorator::__construct()
Mediates between the reporter and the test case.
isOn (line 387)

Is this group actually being tested?

  • return: True if the current test group is active.
  • access: protected
boolean isOn ()
matchesTestCase (line 343)

Compares criteria to actual the case/group name.

  • return: True if matched.
  • access: protected
boolean matchesTestCase (string $test_case)
  • string $test_case: The incoming test.
off (line 378)

Switch off testing for the group or subgroup.

  • access: protected
void off ()
on (line 370)

Switch on testing for the group or subgroup.

  • access: protected
void on ()
paintGroupEnd (line 423)

Paints the end of a group test.

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

Redefinition of:
SimpleReporterDecorator::paintGroupEnd()
Paints the end of a group test.
paintGroupStart (line 411)

Paints the start of a group test.

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

Redefinition of:
SimpleReporterDecorator::paintGroupStart()
Paints the start of a group test.
shouldInvoke (line 398)

Veto everything that doesn't match the method wanted.

  • return: True if test should be run.
  • access: public
boolean shouldInvoke (string $test_case, string $method)
  • string $test_case: Name of test case.
  • string $method: Name of test method.

Redefinition of:
SimpleReporterDecorator::shouldInvoke()
The reporter has a veto on what should be run.
shouldRunTest (line 355)

Compares criteria to actual the test name. If no name was specified at the beginning, then all tests can run.

  • return: True if matched.
  • access: protected
boolean shouldRunTest ( $test_case, string $method)
  • string $method: The incoming test method.
  • $test_case

Inherited Methods

Inherited From SimpleReporterDecorator

 SimpleReporterDecorator::__construct()
 SimpleReporterDecorator::createInvoker()
 SimpleReporterDecorator::getDumper()
 SimpleReporterDecorator::getStatus()
 SimpleReporterDecorator::getTestList()
 SimpleReporterDecorator::makeDry()
 SimpleReporterDecorator::paintCaseEnd()
 SimpleReporterDecorator::paintCaseStart()
 SimpleReporterDecorator::paintError()
 SimpleReporterDecorator::paintException()
 SimpleReporterDecorator::paintFail()
 SimpleReporterDecorator::paintFormattedMessage()
 SimpleReporterDecorator::paintGroupEnd()
 SimpleReporterDecorator::paintGroupStart()
 SimpleReporterDecorator::paintMessage()
 SimpleReporterDecorator::paintMethodEnd()
 SimpleReporterDecorator::paintMethodStart()
 SimpleReporterDecorator::paintPass()
 SimpleReporterDecorator::paintSignal()
 SimpleReporterDecorator::paintSkip()
 SimpleReporterDecorator::shouldInvoke()

Documentation generated on Sun, 31 Oct 2010 16:32:14 -0500 by phpDocumentor 1.4.3