Class XmlReporter

Description

Creates the XML needed for remote communication by SimpleTest.

Located in /xml.php (line 21)

SimpleScorer
   |
   --SimpleReporter
      |
      --XmlReporter
Variable Summary
 mixed $_indent
 mixed $_namespace
Method Summary
 XmlReporter XmlReporter ([string $namespace = false], [string $indent = ' '])
 void paintCaseEnd (string $test_name)
 void paintCaseStart (string $test_name)
 void paintError (string $message)
 void paintException (Exception $exception)
 void paintFail (string $message)
 void paintFooter (string $test_name)
 void paintFormattedMessage (string $message)
 void paintGroupEnd (string $test_name)
 void paintGroupStart (string $test_name, integer $size)
 void paintHeader (string $test_name)
 void paintMessage (string $message)
 void paintMethodEnd (string $test_name, integer $progress)
 void paintMethodStart (string $test_name)
 void paintPass (string $message)
 void paintSignal (string $type, mixed $payload)
 void paintSkip (string $message)
 string toParsedXml (string $text)
 string _getIndent ([integer $offset = 0])
Variables
Methods
Constructor XmlReporter (line 31)

Sets up indentation and namespace.

  • access: public
XmlReporter XmlReporter ([string $namespace = false], [string $indent = ' '])
  • string $namespace: Namespace to add to each tag.
  • string $indent: Indenting to add on each nesting.
paintCaseEnd (line 111)

Paints the end of a test case.

  • access: public
void paintCaseEnd (string $test_name)
  • string $test_name: Name of test that is ending.

Redefinition of:
SimpleReporter::paintCaseEnd()
Paints the end of a test case. Will paint the page footer if the stack of tests has unwound.
paintCaseStart (line 96)

Paints the start of a test case.

  • access: public
void paintCaseStart (string $test_name)
  • string $test_name: Name of test that is starting.

Redefinition of:
SimpleReporter::paintCaseStart()
Paints the start of a test case. Will also paint the page header and footer if this is the first test. Will stash the size if the first start.
paintError (line 175)

Paints error as XML.

  • access: public
void paintError (string $message)
  • string $message: Message to encode.

Redefinition of:
SimpleScorer::paintError()
Deals with PHP 4 throwing an error.
paintException (line 188)

Paints exception as XML.

  • access: public
void paintException (Exception $exception)
  • Exception $exception: Exception to encode.

Redefinition of:
SimpleScorer::paintException()
Deals with PHP 5 throwing an exception.
paintFail (line 162)

Paints failure as XML.

  • access: public
void paintFail (string $message)
  • string $message: Message to encode.

Redefinition of:
SimpleScorer::paintFail()
Increments the fail count.
paintFooter (line 280)

Paints the test document footer.

  • abstract:
  • access: public
void paintFooter (string $test_name)
  • string $test_name: The top level test.

Redefinition of:
SimpleReporter::paintFooter()
Paints the test document footer.
paintFormattedMessage (line 232)

Paints a formatted ASCII message such as a variable dump.

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

Redefinition of:
SimpleScorer::paintFormattedMessage()
Paints a formatted ASCII message such as a variable dump.
paintGroupEnd (line 85)

Paints the end of a group test.

  • access: public
void paintGroupEnd (string $test_name)
  • string $test_name: Name of test that is ending.

Redefinition of:
SimpleReporter::paintGroupEnd()
Paints the end of a group test. Will paint the page footer if the stack of tests has unwound.
paintGroupStart (line 70)

Paints the start of a group test.

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

Redefinition of:
SimpleReporter::paintGroupStart()
Paints the start of a group test. Will also paint the page header and footer if this is the first test. Will stash the size if the first start.
paintHeader (line 261)

Paints the test document header.

  • abstract:
  • access: public
void paintHeader (string $test_name)
  • string $test_name: First test top level to start.

Redefinition of:
SimpleReporter::paintHeader()
Paints the test document header.
paintMessage (line 218)

Paints a simple supplementary message.

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

Redefinition of:
SimpleScorer::paintMessage()
Paints a simple supplementary message.
paintMethodEnd (line 138)

Paints the end of a test method.

  • access: public
void paintMethodEnd (string $test_name, integer $progress)
  • string $test_name: Name of test that is ending.
  • integer $progress: Number of test cases ending.

Redefinition of:
SimpleReporter::paintMethodEnd()
Paints the end of a test method. Will paint the page footer if the stack of tests has unwound.
paintMethodStart (line 122)

Paints the start of a test method.

  • access: public
void paintMethodStart (string $test_name)
  • string $test_name: Name of test that is starting.

Redefinition of:
SimpleReporter::paintMethodStart()
Paints the start of a test method.
paintPass (line 149)

Paints pass as XML.

  • access: public
void paintPass (string $message)
  • string $message: Message to encode.

Redefinition of:
SimpleScorer::paintPass()
Increments the pass count.
paintSignal (line 246)

Serialises the event object.

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

Redefinition of:
SimpleScorer::paintSignal()
By default just ignores user generated events.
paintSkip (line 205)

Paints the skipping message and tag.

  • access: public
void paintSkip (string $message)
  • string $message: Text to display in skip tag.

Redefinition of:
SimpleScorer::paintSkip()
Prints the message for skipping tests.
toParsedXml (line 57)

Converts character string to parsed XML entities string.

  • return: Parsed character data.
  • access: public
string toParsedXml (string $text)
  • string $text: text Unparsed character data.
_getIndent (line 44)

Calculates the pretty printing indent level from the current level of nesting.

  • return: Leading space.
  • access: protected
string _getIndent (integer $offset)
  • integer $offset: Extra indenting level.

Inherited Methods

Inherited From SimpleReporter

 SimpleReporter::SimpleReporter()
 SimpleReporter::getDumper()
 SimpleReporter::getTestCaseCount()
 SimpleReporter::getTestCaseProgress()
 SimpleReporter::getTestList()
 SimpleReporter::inCli()
 SimpleReporter::paintCaseEnd()
 SimpleReporter::paintCaseStart()
 SimpleReporter::paintFooter()
 SimpleReporter::paintGroupEnd()
 SimpleReporter::paintGroupStart()
 SimpleReporter::paintHeader()
 SimpleReporter::paintMethodEnd()
 SimpleReporter::paintMethodStart()

Inherited From SimpleScorer

 SimpleScorer::SimpleScorer()
 SimpleScorer::createInvoker()
 SimpleScorer::getExceptionCount()
 SimpleScorer::getFailCount()
 SimpleScorer::getPassCount()
 SimpleScorer::getStatus()
 SimpleScorer::makeDry()
 SimpleScorer::paintCaseEnd()
 SimpleScorer::paintCaseStart()
 SimpleScorer::paintError()
 SimpleScorer::paintException()
 SimpleScorer::paintFail()
 SimpleScorer::paintFormattedMessage()
 SimpleScorer::paintGroupEnd()
 SimpleScorer::paintGroupStart()
 SimpleScorer::paintMessage()
 SimpleScorer::paintMethodEnd()
 SimpleScorer::paintMethodStart()
 SimpleScorer::paintPass()
 SimpleScorer::paintSignal()
 SimpleScorer::paintSkip()
 SimpleScorer::shouldInvoke()

Documentation generated on Sun, 04 May 2008 09:22:31 -0500 by phpDocumentor 1.3.0