Class CakeTextReporter
CakeTextReporter contains reporting features used for plain text based output
- PHPUnit_TextUI_ResultPrinter
- CakeBaseReporter
- CakeTextReporter
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/TestSuite/Reporter/CakeTextReporter.php
Inherited Properties
Method Summary
-
paintCoverage() public
Generates a Text summary of the coverage data. -
paintDocumentStart() public
Sets the text/plain header if the test is not a CLI test. -
paintException() public
Paints a PHP exception. -
paintFail() public
Paints a failing test. -
paintFooter() public
Paints the end of the test with a summary of the passes and failures.
-
paintFormattedMessage() public
Paints formatted text such as dumped variables. -
paintHeader() public
Paints the title only. -
paintPass() public
Paints a pass -
paintSkip() public
Prints the message for skipping tests. -
testCaseList() public
Generate a test case list in plain text. Creates as series of URLs for tests that can be run. One case per line.
Method Detail
paintCoverage() public ¶
paintCoverage( array $coverage )
Generates a Text summary of the coverage data.
Parameters
- array $coverage
- Array of coverage data.
paintDocumentStart() public ¶
paintDocumentStart( )
Sets the text/plain header if the test is not a CLI test.
Overrides
paintException() public ¶
paintException( Exception $exception )
Paints a PHP exception.
Parameters
- Exception $exception
- Exception to describe.
paintFail() 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() 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() public ¶
paintFormattedMessage( string $message )
Paints formatted text such as dumped variables.
Parameters
- string $message
- Text to show.
paintSkip() public ¶
paintSkip( string $message )
Prints the message for skipping tests.
Parameters
- string $message
- Text of skip condition.
testCaseList() 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
Methods inherited from CakeBaseReporter
__construct() 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() 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() 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() 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() 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() public ¶
baseUrl( )
Get the baseUrl if one is available.
Returns
The base URL for the request.
endTest() 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() public ¶
endTestSuite( PHPUnit_Framework_TestSuite $suite )
A test suite ended.
Parameters
- PHPUnit_Framework_TestSuite $suite
- The suite that ended.
paintDocumentEnd() public ¶
paintDocumentEnd( )
Paints the end of the response from the test suite. Used to paint things like