Documentation

PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer
in package
implements PHPUnit_Framework_TestListener

A TestListener that generates JSON messages.

Tags
since

Class available since Release 3.0.0

Interfaces, Classes and Traits

PHPUnit_Framework_TestListener
A Listener for test progress.

Table of Contents

$autoFlush  : bool
If true, flush output after every write.
$currentTestName  : string
$currentTestPass  : bool
$currentTestSuiteName  : string
$out  : resource
$outTarget  : string
$printsHTML  : bool
__construct()  : mixed
Constructor.
addError()  : mixed
An error occurred.
addFailure()  : mixed
A failure occurred.
addIncompleteTest()  : mixed
Incomplete test.
addRiskyTest()  : mixed
Risky test.
addSkippedTest()  : mixed
Skipped test.
endTest()  : mixed
A test ended.
endTestSuite()  : mixed
A testsuite ended.
flush()  : mixed
Flush buffer, optionally tidy up HTML, and close output if it's not to a php stream
getAutoFlush()  : bool
Check auto-flush mode.
incrementalFlush()  : mixed
Performs a safe, incremental flush.
setAutoFlush()  : mixed
Set auto-flushing mode.
startTest()  : mixed
A test started.
startTestSuite()  : mixed
A testsuite started.
write()  : mixed
writeCase()  : mixed

Properties

$autoFlush

If true, flush output after every write.

protected bool $autoFlush = alse

$currentTestName

protected string $currentTestName = ''

$currentTestPass

protected bool $currentTestPass = rue

$currentTestSuiteName

protected string $currentTestSuiteName = ''

$outTarget

protected string $outTarget

$printsHTML

protected bool $printsHTML = alse

Methods

__construct()

Constructor.

public __construct([mixed $out = null ]) : mixed
Parameters
$out : mixed = null
Tags
throws
PHPUnit_Framework_Exception
Return values
mixed

addRiskyTest()

Risky test.

public addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, float $time) : mixed
Parameters
$test : PHPUnit_Framework_Test
$e : Exception
$time : float
Tags
since

Method available since Release 4.0.0

Return values
mixed

flush()

Flush buffer, optionally tidy up HTML, and close output if it's not to a php stream

public flush() : mixed
Return values
mixed

getAutoFlush()

Check auto-flush mode.

public getAutoFlush() : bool
Tags
since

Method available since Release 3.3.0

Return values
bool

incrementalFlush()

Performs a safe, incremental flush.

public incrementalFlush() : mixed

Do not confuse this function with the flush() function of this class, since the flush() function may close the file being written to, rendering the current object no longer usable.

Tags
since

Method available since Release 3.3.0

Return values
mixed

setAutoFlush()

Set auto-flushing mode.

public setAutoFlush(bool $autoFlush) : mixed

If set, incremental flushes will be done after each write. This should not be confused with the different effects of this class' flush() method.

Parameters
$autoFlush : bool
Tags
since

Method available since Release 3.3.0

Return values
mixed

write()

public write(string $buffer) : mixed
Parameters
$buffer : string
Return values
mixed

writeCase()

protected writeCase(string $status, float $time[, array<string|int, mixed> $trace = array() ][, string $message = '' ][, PHPUnit_Framework_TestCase|null $test = null ]) : mixed
Parameters
$status : string
$time : float
$trace : array<string|int, mixed> = array()
$message : string = ''
$test : PHPUnit_Framework_TestCase|null = null
Return values
mixed

Search results