PHP Класс ParaTest\Logging\JUnit\Writer

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
isEmptyLineAttribute ( string $name, mixed $value ) : boolean Prevent writing empty "line" XML attributes which could break parsers.

Описание методов

__construct() публичный Метод

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

appendCase() защищенный Метод

Append a testcase node to the given testsuite node
protected appendCase ( $suiteNode, TestCase $case ) : DOMElement
$suiteNode
$case TestCase
Результат DOMElement

appendDefects() защищенный Метод

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

appendSuite() защищенный Метод

Append a testsuite node to the given root element
protected appendSuite ( $root, ParaTest\Logging\JUnit\TestSuite $suite ) : DOMElement
$root
$suite ParaTest\Logging\JUnit\TestSuite
Результат DOMElement

getName() публичный Метод

Get the name of the root suite being written
public getName ( ) : string
Результат string

getSuiteRoot() защищенный Метод

Get the root level testsuite node
protected getSuiteRoot ( $suites ) : DOMElement
$suites
Результат DOMElement

getSuiteRootAttributes() защищенный Метод

Get the attributes used on the root testsuite node
protected getSuiteRootAttributes ( $suites ) : mixed
$suites
Результат mixed

getXml() публичный Метод

Returns the xml structure the writer will use
public getXml ( ) : string
Результат string

write() публичный Метод

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

Описание свойств

$caseAttrs защищенное статическое свойство

A pattern for matching testcase attrs
protected static string $caseAttrs
Результат string

$defaultSuite защищенное статическое свойство

A default suite to ease flattening of suite structures
protected static array $defaultSuite
Результат array

$document защищенное свойство

protected DOMDocument $document
Результат DOMDocument

$interpreter защищенное свойство

protected LogInterpreter,ParaTest\Logging $interpreter
Результат ParaTest\Logging\LogInterpreter

$name защищенное свойство

The name attribute of the testsuite being written
protected string $name
Результат string

$suiteAttrs защищенное статическое свойство

A pattern for matching testsuite attributes
protected static string $suiteAttrs
Результат string