CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.2 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.2
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper

Classes

  • CakeBaseReporter
  • CakeHtmlReporter
  • CakeTextReporter

Class CakeHtmlReporter

CakeHtmlReporter Reports Results of TestSuites and Test Cases in an HTML format / context.

PHPUnit_TextUI_ResultPrinter
Extended by CakeBaseReporter
Extended by CakeHtmlReporter
Package: Cake\TestSuite\Reporter
Copyright: Copyright 2005-2012, 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

  • _characterSet, _headerSent, params

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.

  • sendContentType() public
    Set the content-type header so it is in the correct encoding.
  • 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
string
Generated stack trace.

_htmlEntities() protected ¶

_htmlEntities( string $message )

Character set adjusted entity conversion.

Parameters
string $message
Plain text or Unicode message.
Returns
string
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
string
Converted url query string

paintCoverage() public ¶

paintCoverage( array $coverage )

Paints a code coverage report.

paintDocumentEnd() public ¶

paintDocumentEnd( )

Paints the end of the document html.

Overrides
CakeBaseReporter::paintDocumentEnd()

paintDocumentStart() public ¶

paintDocumentStart( )

Paints the document start content contained in header.php

Overrides
CakeBaseReporter::paintDocumentStart()

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
CakeBaseReporter::paintTestMenu()

sendContentType() public ¶

sendContentType( )

Set the content-type header so it is in the correct encoding.

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
CakeBaseReporter::startTestSuite()

testCaseList() public ¶

testCaseList( )

Retrieves and paints the list of tests cases in an HTML format.

Overrides
CakeBaseReporter::testCaseList()

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
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
string
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

paintResult() public ¶

paintResult( PHPUnit_Framework_TestResult $result )

printResult() public ¶

printResult( PHPUnit_Framework_TestResult $result )

startTest() public ¶

startTest( PHPUnit_Framework_Test $test )

A test started.

Parameters
PHPUnit_Framework_Test $test
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs