Lggr
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PHPUnit\Util\TestDox\ResultPrinter Class Reference
Inheritance diagram for PHPUnit\Util\TestDox\ResultPrinter:
Inheritance graph
[legend]
Collaboration diagram for PHPUnit\Util\TestDox\ResultPrinter:
Collaboration graph
[legend]

Public Member Functions

 __construct ($out=null, array $groups=[], array $excludeGroups=[])
 
 flush ()
 
 addError (Test $test, \Exception $e, $time)
 
 addWarning (Test $test, Warning $e, $time)
 
 addFailure (Test $test, AssertionFailedError $e, $time)
 
 addIncompleteTest (Test $test, \Exception $e, $time)
 
 addRiskyTest (Test $test, \Exception $e, $time)
 
 addSkippedTest (Test $test, \Exception $e, $time)
 
 startTestSuite (TestSuite $suite)
 
 endTestSuite (TestSuite $suite)
 
 startTest (Test $test)
 
 endTest (Test $test, $time)
 
- Public Member Functions inherited from PHPUnit\Util\Printer
 __construct ($out=null)
 
 incrementalFlush ()
 
 write ($buffer)
 
 getAutoFlush ()
 
 setAutoFlush ($autoFlush)
 
- Public Member Functions inherited from PHPUnit\Framework\TestListener
 addWarning (Test $test, Warning $e, $time)
 

Protected Member Functions

 doEndClass ()
 
 startRun ()
 
 startClass ($name)
 
 onTest ($name, $success=true)
 
 endClass ($name)
 
 endRun ()
 

Protected Attributes

 $prettifier
 
 $testClass = ''
 
 $testStatus
 
 $tests = []
 
 $successful = 0
 
 $warned = 0
 
 $failed = 0
 
 $risky = 0
 
 $skipped = 0
 
 $incomplete = 0
 
 $currentTestClassPrettified
 
 $currentTestMethodPrettified
 
- Protected Attributes inherited from PHPUnit\Util\Printer
 $autoFlush = false
 
 $out
 
 $outTarget
 

Detailed Description

Base class for printers of TestDox documentation.

Constructor & Destructor Documentation

◆ __construct()

PHPUnit\Util\TestDox\ResultPrinter::__construct (   $out = null,
array  $groups = [],
array  $excludeGroups = [] 
)
Parameters
resource$out
array$groups
array$excludeGroups

Member Function Documentation

◆ addError()

PHPUnit\Util\TestDox\ResultPrinter::addError ( Test  $test,
\Exception  $e,
  $time 
)

An error occurred.

Parameters
Test$test
\Exception$e
float$time

Implements PHPUnit\Framework\TestListener.

◆ addFailure()

PHPUnit\Util\TestDox\ResultPrinter::addFailure ( Test  $test,
AssertionFailedError  $e,
  $time 
)

A failure occurred.

Parameters
Test$test
AssertionFailedError$e
float$time

Implements PHPUnit\Framework\TestListener.

◆ addIncompleteTest()

PHPUnit\Util\TestDox\ResultPrinter::addIncompleteTest ( Test  $test,
\Exception  $e,
  $time 
)

Incomplete test.

Parameters
Test$test
\Exception$e
float$time

Implements PHPUnit\Framework\TestListener.

◆ addRiskyTest()

PHPUnit\Util\TestDox\ResultPrinter::addRiskyTest ( Test  $test,
\Exception  $e,
  $time 
)

Risky test.

Parameters
Test$test
\Exception$e
float$time

Implements PHPUnit\Framework\TestListener.

◆ addSkippedTest()

PHPUnit\Util\TestDox\ResultPrinter::addSkippedTest ( Test  $test,
\Exception  $e,
  $time 
)

Skipped test.

Parameters
Test$test
\Exception$e
float$time

Implements PHPUnit\Framework\TestListener.

◆ addWarning()

PHPUnit\Util\TestDox\ResultPrinter::addWarning ( Test  $test,
Warning  $e,
  $time 
)

A warning occurred.

Parameters
Test$test
Warning$e
float$time

◆ endClass()

PHPUnit\Util\TestDox\ResultPrinter::endClass (   $name)
protected

Handler for 'end class' event.

Parameters
string$name

Reimplemented in PHPUnit\Util\TestDox\HtmlResultPrinter, and PHPUnit\Util\TestDox\TextResultPrinter.

◆ endRun()

PHPUnit\Util\TestDox\ResultPrinter::endRun ( )
protected

Handler for 'end run' event.

Reimplemented in PHPUnit\Util\TestDox\HtmlResultPrinter.

◆ endTest()

PHPUnit\Util\TestDox\ResultPrinter::endTest ( Test  $test,
  $time 
)

A test ended.

Parameters
Test$test
float$time

Implements PHPUnit\Framework\TestListener.

◆ endTestSuite()

PHPUnit\Util\TestDox\ResultPrinter::endTestSuite ( TestSuite  $suite)

A testsuite ended.

Parameters
TestSuite$suite

Implements PHPUnit\Framework\TestListener.

◆ flush()

PHPUnit\Util\TestDox\ResultPrinter::flush ( )

Flush buffer and close output.

Reimplemented from PHPUnit\Util\Printer.

◆ onTest()

PHPUnit\Util\TestDox\ResultPrinter::onTest (   $name,
  $success = true 
)
protected

Handler for 'on test' event.

Parameters
string$name
bool$success

Reimplemented in PHPUnit\Util\TestDox\HtmlResultPrinter, and PHPUnit\Util\TestDox\TextResultPrinter.

◆ startClass()

PHPUnit\Util\TestDox\ResultPrinter::startClass (   $name)
protected

Handler for 'start class' event.

Parameters
string$name

Reimplemented in PHPUnit\Util\TestDox\HtmlResultPrinter, and PHPUnit\Util\TestDox\TextResultPrinter.

◆ startRun()

PHPUnit\Util\TestDox\ResultPrinter::startRun ( )
protected

Handler for 'start run' event.

Reimplemented in PHPUnit\Util\TestDox\HtmlResultPrinter.

◆ startTest()

PHPUnit\Util\TestDox\ResultPrinter::startTest ( Test  $test)

A test started.

Parameters
Test$test

Implements PHPUnit\Framework\TestListener.

◆ startTestSuite()

PHPUnit\Util\TestDox\ResultPrinter::startTestSuite ( TestSuite  $suite)

A testsuite started.

Parameters
TestSuite$suite

Implements PHPUnit\Framework\TestListener.


The documentation for this class was generated from the following file: