[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/tests_runner/lib/simpletest/ -> reporter.php (summary)

base include file for SimpleTest

Version: $Id: reporter.php 5999 2007-06-18 13:13:08Z pachanga $
File Size: 432 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 classes

HtmlReporter:: (11 methods):
  HtmlReporter()
  paintHeader()
  sendNoCacheHeaders()
  _getCss()
  paintFooter()
  paintFail()
  paintError()
  paintException()
  paintSkip()
  paintFormattedMessage()
  _htmlEntities()

TextReporter:: (8 methods):
  TextReporter()
  paintHeader()
  paintFooter()
  paintFail()
  paintError()
  paintException()
  paintSkip()
  paintFormattedMessage()

SelectiveReporter:: (9 methods):
  SelectiveReporter()
  _matchesTestCase()
  _shouldRunTest()
  _on()
  _off()
  _isOn()
  shouldInvoke()
  paintGroupStart()
  paintGroupEnd()


Class: HtmlReporter  - X-Ref

Sample minimal test displayer. Generates only
failure messages and a pass count.

HtmlReporter($character_set = 'ISO-8859-1')   X-Ref
Does nothing yet. The first output will
be sent on the first test start. For use
by a web browser.


paintHeader($test_name)   X-Ref
Paints the top of the web page setting the
title to the name of the starting test.

param: string $test_name      Name class of test.

sendNoCacheHeaders()   X-Ref
Send the headers necessary to ensure the page is
reloaded on every request. Otherwise you could be
scratching your head over out of date test data.


_getCss()   X-Ref
Paints the CSS. Add additional styles here.

return: string            CSS code as text.

paintFooter($test_name)   X-Ref
Paints the end of the test with a summary of
the passes and failures.

param: string $test_name        Name class of test.

paintFail($message)   X-Ref
Paints the test failure with a breadcrumbs
trail of the nesting test suites below the
top level test.

param: string $message    Failure message displayed in

paintError($message)   X-Ref
Paints a PHP error.

param: string $message        Message is ignored.

paintException($exception)   X-Ref
Paints a PHP exception.

param: Exception $exception        Exception to display.

paintSkip($message)   X-Ref
Prints the message for skipping tests.

param: string $message    Text of skip condition.

paintFormattedMessage($message)   X-Ref
Paints formatted text such as dumped variables.

param: string $message        Text to show.

_htmlEntities($message)   X-Ref
Character set adjusted entity conversion.

param: string $message    Plain text or Unicode message.
return: string            Browser readable message.

Class: TextReporter  - X-Ref

Sample minimal test displayer. Generates only
failure messages and a pass count. For command
line use. I've tried to make it look like JUnit,
but I wanted to output the errors as they arrived
which meant dropping the dots.

TextReporter()   X-Ref
Does nothing yet. The first output will
be sent on the first test start.


paintHeader($test_name)   X-Ref
Paints the title only.

param: string $test_name        Name class of test.

paintFooter($test_name)   X-Ref
Paints the end of the test with a summary of
the passes and failures.

param: string $test_name        Name class of test.

paintFail($message)   X-Ref
Paints the test failure as a stack trace.

param: string $message    Failure message displayed in

paintError($message)   X-Ref
Paints a PHP error or exception.

param: string $message        Message to be shown.

paintException($exception)   X-Ref
Paints a PHP error or exception.

param: Exception $exception      Exception to describe.

paintSkip($message)   X-Ref
Prints the message for skipping tests.

param: string $message    Text of skip condition.

paintFormattedMessage($message)   X-Ref
Paints formatted text such as dumped variables.

param: string $message        Text to show.

Class: SelectiveReporter  - X-Ref

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

SelectiveReporter(&$reporter, $just_this_case = false, $just_this_test = false)   X-Ref
Selects the test case or group to be run,
and optionally a specific test.

param: SimpleScorer $reporter    Reporter to receive events.
param: string $just_this_case    Only this case or group will run.
param: string $just_this_test    Only this test method will run.

_matchesTestCase($test_case)   X-Ref
Compares criteria to actual the case/group name.

param: string $test_case    The incoming test.
return: boolean             True if matched.

_shouldRunTest($test_case, $method)   X-Ref
Compares criteria to actual the test name. If no
name was specified at the beginning, then all tests
can run.

param: string $method       The incoming test method.
return: boolean             True if matched.

_on()   X-Ref
Switch on testing for the group or subgroup.


_off()   X-Ref
Switch off testing for the group or subgroup.


_isOn()   X-Ref
Is this group actually being tested?

return: boolean     True if the current test group is active.

shouldInvoke($test_case, $method)   X-Ref
Veto everything that doesn't match the method wanted.

param: string $test_case       Name of test case.
param: string $method          Name of test method.
return: boolean                True if test should be run.

paintGroupStart($test_case, $size)   X-Ref
Paints the start of a group test.

param: string $test_case     Name of test or other label.
param: integer $size         Number of test cases starting.

paintGroupEnd($test_case)   X-Ref
Paints the end of a group test.

param: string $test_case     Name of test or other label.



Generated: Sat Aug 30 04:38:32 2008 Cross-referenced by PHPXref 0.7