PHP Class DataSift\Storyplayer\Reports\JUnitReport

Author: Nicola Asuni ([email protected])
Author: Stuart Herbert ([email protected])
Inheritance: extends Report
Show file Open project: datasift/storyplayer

Protected Properties

Property Type Description
$filename string where will we write our report to?
$silentActivity boolean are we running totally silently?
$testcase array JUnit testcase maps to the phase groups
$testsuite array JUnit testsuite maps to the whole story

Public Methods

Method Description
__construct ( $args )
endPhase ( $phase, $phaseResult ) : void called when a story ends a phase
endPhaseGroup ( PhaseGroup_Result $result ) : void called when we end a set of phases
endStoryplayer ( float $duration ) : void called when storyplayer ends
logCliError ( string $msg ) : void called when the outer CLI shell encounters a fatal error
logCliErrorWithException ( string $msg, Exception $e ) : void
logCliInfo ( string $msg ) : void called when the outer CLI shell needs to tell the user something
logCliWarning ( string $msg ) : void called when the outer CLI shell needs to publish a warning
logPhaseActivity ( string $msg, $codeLine = null ) : void called when a story logs an action
logPhaseCodeLine ( $codeLine )
logPhaseError ( string $phaseName, string $msg ) : void called when a story logs an error
logPhaseSkipped ( string $phaseName, string $msg ) : void called when a story is skipped
logPhaseSubprocessOutput ( string $msg ) : void called when a story logs the (possibly partial) output from running a subprocess
logVardump ( string $name, mixed $var ) : void an alternative to using PHP's built-in var_dump()
resetSilentMode ( )
setSilentMode ( )
startPhase ( $phase ) : void called when a story starts a new phase
startPhaseGroup ( $activity, string $name ) : void called when we start a new set of phases
startStoryplayer ( string $version, string $url, string $copyright, string $license ) : void called when storyplayer starts

Method Details

__construct() public method

public __construct ( $args )

endPhase() public method

called when a story ends a phase
public endPhase ( $phase, $phaseResult ) : void
return void

endPhaseGroup() public method

called when we end a set of phases
public endPhaseGroup ( PhaseGroup_Result $result ) : void
$result PhaseGroup_Result
return void

endStoryplayer() public method

called when storyplayer ends
public endStoryplayer ( float $duration ) : void
$duration float duration in seconds
return void

logCliError() public method

called when the outer CLI shell encounters a fatal error
public logCliError ( string $msg ) : void
$msg string the error message to show the user
return void

logCliErrorWithException() public method

public logCliErrorWithException ( string $msg, Exception $e ) : void
$msg string
$e Exception
return void

logCliInfo() public method

called when the outer CLI shell needs to tell the user something
public logCliInfo ( string $msg ) : void
$msg string the message to show the user
return void

logCliWarning() public method

called when the outer CLI shell needs to publish a warning
public logCliWarning ( string $msg ) : void
$msg string the warning message to show the user
return void

logPhaseActivity() public method

called when a story logs an action
public logPhaseActivity ( string $msg, $codeLine = null ) : void
$msg string
return void

logPhaseCodeLine() public method

public logPhaseCodeLine ( $codeLine )

logPhaseError() public method

called when a story logs an error
public logPhaseError ( string $phaseName, string $msg ) : void
$phaseName string
$msg string
return void

logPhaseSkipped() public method

called when a story is skipped
public logPhaseSkipped ( string $phaseName, string $msg ) : void
$phaseName string
$msg string
return void

logPhaseSubprocessOutput() public method

called when a story logs the (possibly partial) output from running a subprocess
public logPhaseSubprocessOutput ( string $msg ) : void
$msg string the output to log
return void

logVardump() public method

an alternative to using PHP's built-in var_dump()
public logVardump ( string $name, mixed $var ) : void
$name string a human-readable name to describe $var
$var mixed the variable to dump
return void

resetSilentMode() public method

public resetSilentMode ( )

setSilentMode() public method

public setSilentMode ( )

startPhase() public method

called when a story starts a new phase
public startPhase ( $phase ) : void
return void

startPhaseGroup() public method

called when we start a new set of phases
public startPhaseGroup ( $activity, string $name ) : void
$name string
return void

startStoryplayer() public method

called when storyplayer starts
public startStoryplayer ( string $version, string $url, string $copyright, string $license ) : void
$version string
$url string
$copyright string
$license string
return void

Property Details

$filename protected property

where will we write our report to?
protected string $filename
return string

$silentActivity protected property

are we running totally silently?
protected bool $silentActivity
return boolean

$testcase protected property

JUnit testcase maps to the phase groups
protected array $testcase
return array

$testsuite protected property

JUnit testsuite maps to the whole story
protected array $testsuite
return array