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. (https://cakefoundation.org)
License: MIT License
Location: Cake/TestSuite/Reporter/CakeTextReporter.php

Inherited Properties

Method Summary

Method Detail

paintCoverage()source public

paintCoverage( array $coverage )

Generates a Text summary of the coverage data.

Parameters

array $coverage
Array of coverage data.

paintDocumentStart()source public

paintDocumentStart( )

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

Overrides

CakeBaseReporter::paintDocumentStart()

paintException()source public

paintException( Exception $exception )

Paints a PHP exception.

Parameters

Exception $exception
Exception to describe.

paintFail()source 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.

paintFooter()source 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

paintFormattedMessage()source public

paintFormattedMessage( string $message )

Paints formatted text such as dumped variables.

Parameters

string $message
Text to show.

paintHeader()source public

paintHeader( )

Paints the title only.

paintPass()source public

paintPass( )

Paints a pass

paintSkip()source public

paintSkip( string $message )

Prints the message for skipping tests.

Parameters

string $message
Text of skip condition.

testCaseList()source 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

__construct()source 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.

addError()source 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.

addFailure()source 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.

addIncompleteTest()source 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.

addSkippedTest()source 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.

baseUrl()source public

baseUrl( )

Get the baseUrl if one is available.

Returns

string
The base URL for the request.

endTest()source 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.

endTestSuite()source public

endTestSuite( PHPUnit_Framework_TestSuite $suite )

A test suite ended.

Parameters

PHPUnit_Framework_TestSuite $suite
The suite that ended.

paintDocumentEnd()source public

paintDocumentEnd( )

Paints the end of the response from the test suite. Used to paint things like

© 2005–2017 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.
https://api.cakephp.org/2.10/class-CakeTextReporter.html