Class CakeTextReporter

CakeTextReporter contains reporting features used for plain text based output

PHPUnit_TextUI_ResultPrinter
Extended by CakeBaseReporter
Extended by CakeTextReporter
Package: Cake\TestSuite\Reporter
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Located at Cake/TestSuite/Reporter/CakeTextReporter.php

Method Detail

paintCoveragesource public

paintCoverage( array $coverage )

Generates a Text summary of the coverage data.

Parameters

array $coverage
Array of coverage data.

paintDocumentStartsource public

paintDocumentStart( )

Sets the text/plain header if the test is not a CLI test.

Overrides

CakeBaseReporter::paintDocumentStart()

paintExceptionsource public

paintException( Exception $exception )

Paints a PHP exception.

Parameters

Exception $exception
Exception to describe.

paintFailsource public

paintFail( PHPUnit_Framework_AssertionFailedError $message )

Paints a failing test.

Parameters

PHPUnit_Framework_AssertionFailedError $message
Failure object displayed in the context of the other tests.

paintFootersource public

paintFooter( PHPUnit_Framework_TestResult $result )

Paints the end of the test with a summary of the passes and failures.

Parameters

PHPUnit_Framework_TestResult $result
Result object

paintFormattedMessagesource public

paintFormattedMessage( string $message )

Paints formatted text such as dumped variables.

Parameters

string $message
Text to show.

paintHeadersource public

paintHeader( )

Paints the title only.

paintPasssource public

paintPass( )

Paints a pass

paintSkipsource public

paintSkip( string $message )

Prints the message for skipping tests.

Parameters

string $message
Text of skip condition.

testCaseListsource public

testCaseList( )

Generate a test case list in plain text. Creates as series of URLs for tests that can be run. One case per line.

Overrides

CakeBaseReporter::testCaseList()

Methods inherited from CakeBaseReporter

__constructsource public

__construct( string $charset 'utf-8' , array $params array() )

Does nothing yet. The first output will be sent on the first test start.

Params

  • show_passes - Should passes be shown
  • plugin - Plugin test being run?
  • core - Core test being run.
  • case - The case being run
  • codeCoverage - Whether the case/group being run is being code covered.

Parameters

string $charset optional 'utf-8'
The character set to output with. Defaults to UTF-8
array $params optional array()
Array of request parameters the reporter should use. See above.

addErrorsource public

addError( PHPUnit_Framework_Test $test , Exception $e , float $time )

An error occurred.

Parameters

PHPUnit_Framework_Test $test
The test to add an error for.
Exception $e
The exception object to add.
float $time
The current time.

addFailuresource public

addFailure( PHPUnit_Framework_Test $test , PHPUnit_Framework_AssertionFailedError $e , float $time )

A failure occurred.

Parameters

PHPUnit_Framework_Test $test
The test that failed
PHPUnit_Framework_AssertionFailedError $e
The assertion that failed.
float $time
The current time.

addIncompleteTestsource public

addIncompleteTest( PHPUnit_Framework_Test $test , Exception $e , float $time )

Incomplete test.

Parameters

PHPUnit_Framework_Test $test
The test that was incomplete.
Exception $e
The incomplete exception
float $time
The current time.

addSkippedTestsource public

addSkippedTest( PHPUnit_Framework_Test $test , Exception $e , float $time )

Skipped test.

Parameters

PHPUnit_Framework_Test $test
The test that failed.
Exception $e
The skip object.
float $time
The current time.

baseUrlsource public

baseUrl( )

Get the baseUrl if one is available.

Returns

string
The base URL for the request.

endTestsource public

endTest( PHPUnit_Framework_Test $test , float $time )

A test ended.

Parameters

PHPUnit_Framework_Test $test
The test that ended
float $time
The current time.

endTestSuitesource public

endTestSuite( PHPUnit_Framework_TestSuite $suite )

A test suite ended.

Parameters

PHPUnit_Framework_TestSuite $suite
The suite that ended.

paintDocumentEndsource public

paintDocumentEnd( )

Paints the end of the response from the test suite. Used to paint things like </body> in an html page.

paintResultsource public

paintResult( PHPUnit_Framework_TestResult $result )

Paint result

Parameters

PHPUnit_Framework_TestResult $result
The result object

paintTestMenusource public

paintTestMenu( )

Paint a list of test sets, core, app, and plugin test sets available.

printResultsource public

printResult( PHPUnit_Framework_TestResult $result )

Print result

Parameters

PHPUnit_Framework_TestResult $result
The result object

startTestsource public

startTest( PHPUnit_Framework_Test $test )

A test started.

Parameters

PHPUnit_Framework_Test $test
The test that started.

startTestSuitesource public

startTestSuite( PHPUnit_Framework_TestSuite $suite )

A test suite started.

Parameters

PHPUnit_Framework_TestSuite $suite
The suite to start

Properties inherited from CakeBaseReporter

$_characterSetsource

protected string

Character set for the output of test reporting.

$_headerSentsource

protected boolean

Headers sent

false

$paramssource

public array

Array of request parameters. Usually parsed GET params.

array()

© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.7/class-CakeTextReporter.html