On this page
Class CakeHtmlReporter
CakeHtmlReporter Reports Results of TestSuites and Test Cases in an HTML format / context.
- PHPUnit_TextUI_ResultPrinter
- CakeBaseReporter 
- CakeHtmlReporter 
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/TestSuite/Reporter/CakeHtmlReporter.php
Inherited Properties
Method Summary
- 
    _getQueryLink() protectedReturns the query string formatted for ouput in links
- 
    _getStackTrace() protectedGets a formatted stack trace.
- 
    _htmlEntities() protectedCharacter set adjusted entity conversion.
- 
    _paintLinks() protectedRenders the links that for accessing things in the test suite.
- 
    _queryString() protectedConvert an array of parameters into a query string url
- 
    paintCoverage() publicPaints a code coverage report.
- 
    paintDocumentEnd() publicPaints the end of the document html.
- 
    paintDocumentStart() publicPaints the document start content contained in header.php
- 
    paintException() publicPaints a PHP exception.
- 
    paintFail() publicPaints the test failure with a breadcrumbs trail of the nesting test suites below the top level test. 
- 
    paintFooter() publicPaints the end of the test with a summary of the passes and failures. 
- 
    paintFormattedMessage() publicPaints formatted text such as dumped variables.
- 
    paintHeader() publicPaints the top of the web page setting the title to the name of the starting test. 
- 
    paintPass() publicPaints the test pass with a breadcrumbs trail of the nesting test suites below the top level test. 
- 
    paintSkip() publicPrints the message for skipping tests.
- 
    paintTestMenu() publicPaints the menu on the left side of the test suite interface. Contains all of the various plugin, core, and app buttons. 
- 
    sendContentType() publicSet the content-type header so it is in the correct encoding.
- 
    sendNoCacheHeaders() publicSend 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() publicA test suite started.
- 
    testCaseList() publicRetrieves and paints the list of tests cases in an HTML format.
Method Detail
_getQueryLink()source protected
_getQueryLink( )Returns the query string formatted for ouput in links
Returns
string_getStackTrace()source protected
_getStackTrace( Exception $e )Gets a formatted stack trace.
Parameters
- 
     Exception $e
- Exception to get a stack trace for.
Returns
stringGenerated stack trace.
_htmlEntities()source protected
_htmlEntities( string $message )Character set adjusted entity conversion.
Parameters
- 
     string $message
- Plain text or Unicode message.
Returns
stringBrowser readable message.
_paintLinks()source protected
_paintLinks( )Renders the links that for accessing things in the test suite.
_queryString()source protected
_queryString( array $url )Convert an array of parameters into a query string url
Parameters
- 
     array $url
- Url hash to be converted
Returns
stringConverted url query string
paintCoverage()source public
paintCoverage( array $coverage )Paints a code coverage report.
Parameters
- 
     array $coverage
- The coverage data
paintDocumentEnd()source public
paintDocumentEnd( )Paints the end of the document html.
Overrides
CakeBaseReporter::paintDocumentEnd()
  paintDocumentStart()source public
paintDocumentStart( )Paints the document start content contained in header.php
Overrides
CakeBaseReporter::paintDocumentStart()
  paintException()source public
paintException( Exception $message , mixed $test )Paints a PHP exception.
Parameters
- 
     Exception $message
- Exception to display.
- 
     mixed $test
- The test that failed.
paintFail()source public
paintFail( PHPUnit_Framework_AssertionFailedError $message , mixed $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. 
- 
     mixed $test
- The test case to paint a failure for.
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 top of the web page setting the title to the name of the starting test.
paintPass()source 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
- Test method that just passed
- 
     float $timeoptional null
- time spent to run the test method
paintSkip()source 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()source 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
CakeBaseReporter::paintTestMenu()
  sendContentType()source public
sendContentType( )Set the content-type header so it is in the correct encoding.
sendNoCacheHeaders()source 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()source public
startTestSuite( PHPUnit_Framework_TestSuite $suite )A test suite started.
Parameters
- 
     PHPUnit_Framework_TestSuite $suite
- The test suite to start.
Overrides
CakeBaseReporter::startTestSuite()
  testCaseList()source public
testCaseList( )Retrieves and paints the list of tests cases in an HTML format.
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 $charsetoptional 'utf-8'
- The character set to output with. Defaults to UTF-8
- 
     array $paramsoptional 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
stringThe 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.
paintResult()source public
paintResult( PHPUnit_Framework_TestResult $result )Paint result
Parameters
- 
     PHPUnit_Framework_TestResult $result
- The result object
printResult()source public
printResult( PHPUnit_Framework_TestResult $result )Print result
Parameters
- 
     PHPUnit_Framework_TestResult $result
- The result object
startTest()source public
startTest( PHPUnit_Framework_Test $test )A test started.
Parameters
- 
     PHPUnit_Framework_Test $test
- The test that started.
© 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-CakeHtmlReporter.html