PHP Class ParaTest\Logging\JUnit\Writer

Afficher le fichier Open project: brianium/paratest Class Usage Examples

Protected Properties

Свойство Type Description
$caseAttrs string A pattern for matching testcase attrs
$defaultSuite array A default suite to ease flattening of suite structures
$document DOMDocument
$interpreter ParaTest\Logging\LogInterpreter
$name string The name attribute of the testsuite being written
$suiteAttrs string A pattern for matching testsuite attributes

Méthodes publiques

Méthode Description
__construct ( LogInterpreter $interpreter, $name = '' )
getName ( ) : string Get the name of the root suite being written
getXml ( ) : string Returns the xml structure the writer will use
write ( $path ) Write the xml structure to a file path

Méthodes protégées

Méthode Description
appendCase ( $suiteNode, TestCase $case ) : DOMElement Append a testcase node to the given testsuite node
appendDefects ( $caseNode, $defects, $type ) Append error or failure nodes to the given testcase node
appendSuite ( $root, ParaTest\Logging\JUnit\TestSuite $suite ) : DOMElement Append a testsuite node to the given root element
getSuiteRoot ( $suites ) : DOMElement Get the root level testsuite node
getSuiteRootAttributes ( $suites ) : mixed Get the attributes used on the root testsuite node

Private Methods

Méthode Description
isEmptyLineAttribute ( string $name, mixed $value ) : boolean Prevent writing empty "line" XML attributes which could break parsers.

Method Details

__construct() public méthode

public __construct ( LogInterpreter $interpreter, $name = '' )
$interpreter ParaTest\Logging\LogInterpreter

appendCase() protected méthode

Append a testcase node to the given testsuite node
protected appendCase ( $suiteNode, TestCase $case ) : DOMElement
$suiteNode
$case TestCase
Résultat DOMElement

appendDefects() protected méthode

Append error or failure nodes to the given testcase node
protected appendDefects ( $caseNode, $defects, $type )
$caseNode
$defects
$type

appendSuite() protected méthode

Append a testsuite node to the given root element
protected appendSuite ( $root, ParaTest\Logging\JUnit\TestSuite $suite ) : DOMElement
$root
$suite ParaTest\Logging\JUnit\TestSuite
Résultat DOMElement

getName() public méthode

Get the name of the root suite being written
public getName ( ) : string
Résultat string

getSuiteRoot() protected méthode

Get the root level testsuite node
protected getSuiteRoot ( $suites ) : DOMElement
$suites
Résultat DOMElement

getSuiteRootAttributes() protected méthode

Get the attributes used on the root testsuite node
protected getSuiteRootAttributes ( $suites ) : mixed
$suites
Résultat mixed

getXml() public méthode

Returns the xml structure the writer will use
public getXml ( ) : string
Résultat string

write() public méthode

Write the xml structure to a file path
public write ( $path )
$path

Property Details

$caseAttrs protected_oe static_oe property

A pattern for matching testcase attrs
protected static string $caseAttrs
Résultat string

$defaultSuite protected_oe static_oe property

A default suite to ease flattening of suite structures
protected static array $defaultSuite
Résultat array

$document protected_oe property

protected DOMDocument $document
Résultat DOMDocument

$interpreter protected_oe property

protected LogInterpreter,ParaTest\Logging $interpreter
Résultat ParaTest\Logging\LogInterpreter

$name protected_oe property

The name attribute of the testsuite being written
protected string $name
Résultat string

$suiteAttrs protected_oe static_oe property

A pattern for matching testsuite attributes
protected static string $suiteAttrs
Résultat string