Class CakeHtmlReporter
CakeHtmlReporter Reports Results of TestSuites and Test Cases in an HTML format / context.
- PHPUnit_TextUI_ResultPrinter
- CakeBaseReporter
- CakeHtmlReporter
Copyright: Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: Cake/TestSuite/Reporter/CakeHtmlReporter.php
Inherited Properties
Method Summary
-
_getStackTrace() protected
Gets a formatted stack trace. -
_htmlEntities() protected
Character set adjusted entity conversion. -
_paintLinks() protected
Renders the links that for accessing things in the test suite. -
_queryString() protected
Convert an array of parameters into a query string url -
paintCoverage() public
Paints a code coverage report. -
paintDocumentEnd() public
Paints the end of the document html. -
paintDocumentStart() public
Paints the document start content contained in header.php -
paintException() public
Paints a PHP exception. -
paintFail() public
Paints the test failure with a breadcrumbs trail of the nesting test suites below the top level 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 top of the web page setting the title to the name of the starting test.
-
paintPass() public
Paints the test pass with a breadcrumbs trail of the nesting test suites below the top level test.
-
paintSkip() public
Prints the message for skipping tests. -
paintTestMenu() public
Paints the menu on the left side of the test suite interface. Contains all of the various plugin, core, and app buttons.
-
sendNoCacheHeaders() public
Send the headers necessary to ensure the page is reloaded on every request. Otherwise you could be scratching your head over out of date test data.
-
startTestSuite() public
A test suite started. -
testCaseList() public
Retrieves and paints the list of tests cases in an HTML format.
Method Detail
_getStackTrace() protected ¶
_getStackTrace( Exception $e )
Gets a formatted stack trace.
Parameters
- Exception $e
- Exception to get a stack trace for.
Returns
Generated stack trace.
_htmlEntities() protected ¶
_htmlEntities( string $message )
Character set adjusted entity conversion.
Parameters
- string $message
- Plain text or Unicode message.
Returns
Browser readable message.
_paintLinks() protected ¶
_paintLinks( )
Renders the links that for accessing things in the test suite.
_queryString() protected ¶
_queryString( array $url )
Convert an array of parameters into a query string url
Parameters
- array $url
- Url hash to be converted
Returns
Converted url query string
paintDocumentStart() public ¶
paintDocumentStart( )
Paints the document start content contained in header.php
Overrides
paintException() public ¶
paintException( Exception $message , $test )
Paints a PHP exception.
Parameters
- Exception $message
- $exception Exception to display.
- $test
paintFail() public ¶
paintFail( PHPUnit_Framework_AssertionFailedError $message , $test )
Paints the test failure with a breadcrumbs trail of the nesting test suites below the top level test.
Parameters
- PHPUnit_Framework_AssertionFailedError $message
Failure object displayed in the context of the other tests.
- $test
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.
paintHeader() public ¶
paintHeader( )
Paints the top of the web page setting the title to the name of the starting test.
paintPass() public ¶
paintPass( PHPUnit_Framework_Test $test , float $time = null )
Paints the test pass with a breadcrumbs trail of the nesting test suites below the top level test.
Parameters
- PHPUnit_Framework_Test $test
- method that just passed
- float $time optional null
- time spent to run the test method
paintSkip() public ¶
paintSkip( string $message , PHPUnit_Framework_TestCase $test )
Prints the message for skipping tests.
Parameters
- string $message
- Text of skip condition.
- PHPUnit_Framework_TestCase $test
- the test method skipped
paintTestMenu() public ¶
paintTestMenu( )
Paints the menu on the left side of the test suite interface. Contains all of the various plugin, core, and app buttons.
Overrides
sendNoCacheHeaders() public ¶
sendNoCacheHeaders( )
Send the headers necessary to ensure the page is reloaded on every request. Otherwise you could be scratching your head over out of date test data.
startTestSuite() public ¶
startTestSuite( PHPUnit_Framework_TestSuite $suite )
A test suite started.
Parameters
- PHPUnit_Framework_TestSuite $suite
Overrides
testCaseList() public ¶
testCaseList( )
Retrieves and paints the list of tests cases in an HTML format.
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?
- app - App 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
- Exception $e
- float $time
addFailure() public ¶
addFailure( PHPUnit_Framework_Test $test , PHPUnit_Framework_AssertionFailedError $e , float $time )
A failure occurred.
Parameters
- PHPUnit_Framework_Test $test
- PHPUnit_Framework_AssertionFailedError $e
- float $time
addIncompleteTest() public ¶
addIncompleteTest( PHPUnit_Framework_Test $test , Exception $e , float $time )
Incomplete test.
Parameters
- PHPUnit_Framework_Test $test
- Exception $e
- float $time
addSkippedTest() public ¶
addSkippedTest( PHPUnit_Framework_Test $test , Exception $e , float $time )
Skipped test.
Parameters
- PHPUnit_Framework_Test $test
- Exception $e
- float $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
- float $time
endTestSuite() public ¶
endTestSuite( PHPUnit_Framework_TestSuite $suite )
A test suite ended.
Parameters
- PHPUnit_Framework_TestSuite $suite
startTest() public ¶
startTest( PHPUnit_Framework_Test $test )
A test started.
Parameters
- PHPUnit_Framework_Test $test