PHP Class ParaTest\Logging\JUnit\TestCase

A simple data structure for tracking the results of a testcase node in a JUnit xml document
Show file Open project: brianium/paratest

Public Properties

Property Type Description
$assertions integer
$class string
$errors array Number of errors in this test case
$failures array Number of failures in this test case
$file string
$line string
$name string
$time string

Public Methods

Method Description
__construct ( $name, $class, $file, $line, $assertions, $time )
addError ( string $type, string $text )
addFailure ( string $type, string $text )
addSystemOut ( mixed $node ) : mixed Add systemOut result on test (if has failed or have error)
caseFromNode ( SimpleXMLElement $node ) : TestCase Factory method that creates a TestCase object from a SimpleXMLElement

Protected Methods

Method Description
addDefect ( string $collName, $type, $text ) Add a defect type (error or failure)

Method Details

__construct() public method

public __construct ( $name, $class, $file, $line, $assertions, $time )

addDefect() protected method

Add a defect type (error or failure)
protected addDefect ( string $collName, $type, $text )
$collName string the name of the collection to add to
$type
$text

addError() public method

public addError ( string $type, string $text )
$type string
$text string

addFailure() public method

public addFailure ( string $type, string $text )
$type string
$text string

addSystemOut() public static method

Add systemOut result on test (if has failed or have error)
public static addSystemOut ( mixed $node ) : mixed
$node mixed
return mixed

caseFromNode() public static method

Factory method that creates a TestCase object from a SimpleXMLElement
public static caseFromNode ( SimpleXMLElement $node ) : TestCase
$node SimpleXMLElement
return TestCase

Property Details

$assertions public property

public int $assertions
return integer

$class public property

public string $class
return string

$errors public property

Number of errors in this test case
public array $errors
return array

$failures public property

Number of failures in this test case
public array $failures
return array

$file public property

public string $file
return string

$line public property

public string $line
return string

$name public property

public string $name
return string

$time public property

public string $time
return string