[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

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

base include file for SimpleTest

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

Defines 6 classes

XmlReporter:: (19 methods):
  XmlReporter()
  _getIndent()
  toParsedXml()
  paintGroupStart()
  paintGroupEnd()
  paintCaseStart()
  paintCaseEnd()
  paintMethodStart()
  paintMethodEnd()
  paintPass()
  paintFail()
  paintError()
  paintException()
  paintSkip()
  paintMessage()
  paintFormattedMessage()
  paintSignal()
  paintHeader()
  paintFooter()

NestingXmlTag:: (4 methods):
  NestingXmlTag()
  setName()
  getName()
  _getAttributes()

NestingMethodTag:: (3 methods):
  NestingMethodTag()
  paintStart()
  paintEnd()

NestingCaseTag:: (3 methods):
  NestingCaseTag()
  paintStart()
  paintEnd()

NestingGroupTag:: (4 methods):
  NestingGroupTag()
  paintStart()
  paintEnd()
  getSize()

SimpleTestXmlParser:: (11 methods):
  SimpleTestXmlParser()
  parse()
  _createParser()
  _pushNestingTag()
  _getCurrentNestingTag()
  _popNestingTag()
  _isLeaf()
  _startElement()
  _endElement()
  _addContent()
  _default()


Class: XmlReporter  - X-Ref

Creates the XML needed for remote communication
by SimpleTest.

XmlReporter($namespace = false, $indent = ' ')   X-Ref
Sets up indentation and namespace.

param: string $namespace        Namespace to add to each tag.
param: string $indent           Indenting to add on each nesting.

_getIndent($offset = 0)   X-Ref
Calculates the pretty printing indent level
from the current level of nesting.

param: integer $offset  Extra indenting level.
return: string          Leading space.

toParsedXml($text)   X-Ref
Converts character string to parsed XML
entities string.

param: string text        Unparsed character data.
return: string            Parsed character data.

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

param: string $test_name   Name of test that is starting.
param: integer $size       Number of test cases starting.

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

param: string $test_name   Name of test that is ending.

paintCaseStart($test_name)   X-Ref
Paints the start of a test case.

param: string $test_name   Name of test that is starting.

paintCaseEnd($test_name)   X-Ref
Paints the end of a test case.

param: string $test_name   Name of test that is ending.

paintMethodStart($test_name)   X-Ref
Paints the start of a test method.

param: string $test_name   Name of test that is starting.

paintMethodEnd($test_name)   X-Ref
Paints the end of a test method.

param: string $test_name   Name of test that is ending.
param: integer $progress   Number of test cases ending.

paintPass($message)   X-Ref
Paints pass as XML.

param: string $message        Message to encode.

paintFail($message)   X-Ref
Paints failure as XML.

param: string $message        Message to encode.

paintError($message)   X-Ref
Paints error as XML.

param: string $message        Message to encode.

paintException($exception)   X-Ref
Paints exception as XML.

param: Exception $exception    Exception to encode.

paintSkip($message)   X-Ref
Paints the skipping message and tag.

param: string $message        Text to display in skip tag.

paintMessage($message)   X-Ref
Paints a simple supplementary message.

param: string $message        Text to display.

paintFormattedMessage($message)   X-Ref
Paints a formatted ASCII message such as a
variable dump.

param: string $message        Text to display.

paintSignal($type, &$payload)   X-Ref
Serialises the event object.

param: string $type        Event type as text.
param: mixed $payload      Message or object.

paintHeader($test_name)   X-Ref
Paints the test document header.

param: string $test_name     First test top level

paintFooter($test_name)   X-Ref
Paints the test document footer.

param: string $test_name        The top level test.

Class: NestingXmlTag  - X-Ref

Accumulator for incoming tag. Holds the
incoming test structure information for
later dispatch to the reporter.

NestingXmlTag($attributes)   X-Ref
Sets the basic test information except
the name.

param: hash $attributes   Name value pairs.

setName($name)   X-Ref
Sets the test case/method name.

param: string $name        Name of test.

getName()   X-Ref
Accessor for name.

return: string        Name of test.

_getAttributes()   X-Ref
Accessor for attributes.

return: hash        All attributes.

Class: NestingMethodTag  - X-Ref

Accumulator for incoming method tag. Holds the
incoming test structure information for
later dispatch to the reporter.

NestingMethodTag($attributes)   X-Ref
Sets the basic test information except
the name.

param: hash $attributes   Name value pairs.

paintStart(&$listener)   X-Ref
Signals the appropriate start event on the
listener.

param: SimpleReporter $listener    Target for events.

paintEnd(&$listener)   X-Ref
Signals the appropriate end event on the
listener.

param: SimpleReporter $listener    Target for events.

Class: NestingCaseTag  - X-Ref

Accumulator for incoming case tag. Holds the
incoming test structure information for
later dispatch to the reporter.

NestingCaseTag($attributes)   X-Ref
Sets the basic test information except
the name.

param: hash $attributes   Name value pairs.

paintStart(&$listener)   X-Ref
Signals the appropriate start event on the
listener.

param: SimpleReporter $listener    Target for events.

paintEnd(&$listener)   X-Ref
Signals the appropriate end event on the
listener.

param: SimpleReporter $listener    Target for events.

Class: NestingGroupTag  - X-Ref

Accumulator for incoming group tag. Holds the
incoming test structure information for
later dispatch to the reporter.

NestingGroupTag($attributes)   X-Ref
Sets the basic test information except
the name.

param: hash $attributes   Name value pairs.

paintStart(&$listener)   X-Ref
Signals the appropriate start event on the
listener.

param: SimpleReporter $listener    Target for events.

paintEnd(&$listener)   X-Ref
Signals the appropriate end event on the
listener.

param: SimpleReporter $listener    Target for events.

getSize()   X-Ref
The size in the attributes.

return: integer     Value of size attribute or zero.

Class: SimpleTestXmlParser  - X-Ref

Parser for importing the output of the XmlReporter.
Dispatches that output to another reporter.

SimpleTestXmlParser(&$listener)   X-Ref
Loads a listener with the SimpleReporter
interface.

param: SimpleReporter $listener   Listener of tag events.

parse($chunk)   X-Ref
Parses a block of XML sending the results to
the listener.

param: string $chunk        Block of text to read.
return: boolean             True if valid XML.

_createParser()   X-Ref
Sets up expat as the XML parser.

return: resource        Expat handle.

_pushNestingTag($nested)   X-Ref
Opens a new test nesting level.

return: NestedXmlTag     The group, case or method tag

_getCurrentNestingTag()   X-Ref
Accessor for current test structure tag.

return: NestedXmlTag     The group, case or method tag

_popNestingTag()   X-Ref
Ends a nesting tag.

return: NestedXmlTag     The group, case or method tag

_isLeaf($tag)   X-Ref
Test if tag is a leaf node with only text content.

param: string $tag        XML tag name.
return: @boolean          True if leaf, false if nesting.

_startElement($expat, $tag, $attributes)   X-Ref
Handler for start of event element.

param: resource $expat     Parser handle.
param: string $tag         Element name.
param: hash $attributes    Name value pairs.

_endElement($expat, $tag)   X-Ref
End of element event.

param: resource $expat     Parser handle.
param: string $tag         Element name.

_addContent($expat, $text)   X-Ref
Content between start and end elements.

param: resource $expat     Parser handle.
param: string $text        Usually output messages.

_default($expat, $default)   X-Ref
XML and Doctype handler. Discards all such content.

param: resource $expat     Parser handle.
param: string $default     Text of default content.



Generated: Mon Sep 8 04:35:41 2008 Cross-referenced by PHPXref 0.7