Overview

Namespaces

  • Evenement
  • None
  • Peridot
    • Console
    • Core
    • Reporter
    • Runner
    • Scope
    • Test
  • Symfony
    • Component
      • Console
        • Command
        • Descriptor
        • Event
        • Exception
        • Formatter
        • Helper
        • Input
        • Logger
        • Output
        • Question
        • Style
        • Tester
        • Tests
          • Command
          • Descriptor
          • Fixtures
          • Formatter
          • Helper
          • Input
          • Logger
          • Output
          • Style
          • Tester

Classes

  • AbstractBaseReporter
  • AnonymousReporter
  • CompositeReporter
  • ReporterFactory
  • SpecReporter

Interfaces

  • ReporterInterface
  • Overview
  • Namespace
  • Class

Class AbstractBaseReporter

The base class for all Peridot reporters. Sits on top of an OutputInterface and an EventEmitter in order to report Peridot results.

Peridot\Reporter\AbstractBaseReporter implements Peridot\Reporter\ReporterInterface uses Peridot\Core\HasEventEmitterTrait

Direct known subclasses

Peridot\Reporter\AnonymousReporter, Peridot\Reporter\CompositeReporter, Peridot\Reporter\SpecReporter
Abstract
Namespace: Peridot\Reporter
Package: Peridot\Reporter
Located at Reporter/AbstractBaseReporter.php
Methods summary
public
# __construct( Peridot\Configuration $configuration, Symfony\Component\Console\Output\OutputInterface $output, Evenement\EventEmitterInterface $eventEmitter )

Parameters

$configuration
$output
$eventEmitter
public string
# color( $key, $text )

Given a color name, colorize the provided text in that color

Given a color name, colorize the provided text in that color

Parameters

$key
$text

Returns

string

Implementation of

Peridot\Reporter\ReporterInterface::color()
public string
# symbol( $name )

Fetch a symbol by name

Fetch a symbol by name

Parameters

$name

Returns

string

Implementation of

Peridot\Reporter\ReporterInterface::symbol()
public Symfony\Component\Console\Output\OutputInterface
# getOutput( )

Return the OutputInterface associated with the Reporter

Return the OutputInterface associated with the Reporter

Returns

Symfony\Component\Console\Output\OutputInterface

Implementation of

Peridot\Reporter\ReporterInterface::getOutput()
public Peridot\Configuration
# getConfiguration( )

Return the Configuration associated with the Reporter

Return the Configuration associated with the Reporter

Returns

Peridot\Configuration

Implementation of

Peridot\Reporter\ReporterInterface::getConfiguration()
public
# setTime( float $time )

Set the run time to report.

Set the run time to report.

Parameters

$time
public float
# getTime( )

Get the run time to report.

Get the run time to report.

Returns

float
public
# footer( )

Output result footer

Output result footer

public
# warnings( Peridot\Core\TestResult $result )

Output result warnings

Output result warnings

Parameters

$result
protected
# outputError( integer $errorNumber, Peridot\Core\TestInterface $test, $exception )

Output a test failure.

Output a test failure.

Parameters

$errorNumber
$test
$exception
an exception like interface with ->getMessage(), ->getTrace()
protected
# outputTrace( array $trace )

Output a stack trace.

Output a stack trace.

Parameters

$trace
protected boolean
# hasColorSupport( )

Determine if colorized output is supported by the reporters output. Taken from Symfony's console output with some slight modifications to use the reporter's output stream

Determine if colorized output is supported by the reporters output. Taken from Symfony's console output with some slight modifications to use the reporter's output stream

Returns

boolean
protected
# registerSymbols( )

Register reporter symbols, additionally checking OS compatibility.

Register reporter symbols, additionally checking OS compatibility.

protected boolean
# isOnWindows( )

Return true if reporter is being used on windows

Return true if reporter is being used on windows

Returns

boolean
abstract public
# init( )

Initialize reporter. Setup and listen for events

Initialize reporter. Setup and listen for events

Implementation of

Peridot\Reporter\ReporterInterface::init()
Methods inherited from Peridot\Reporter\ReporterInterface
getEventEmitter()
Methods used from Peridot\Core\HasEventEmitterTrait
getEventEmitter(), setEventEmitter()
Properties summary
protected Peridot\Configuration $configuration
#
protected Symfony\Component\Console\Output\OutputInterface $output
#
protected array $errors
# []
protected integer $passing
# 0
protected integer $pending
# 0
protected float|integer $time
#
protected array $colors

Maps color names to left and right color sequences.

Maps color names to left and right color sequences.

# array( 'white' => ['left' => "\033[37m", 'right' => "\033[39m"], 'success' => ['left' => "\033[32m", 'right' => "\033[39m"], 'error' => ['left' => "\033[31m", 'right' => "\033[39m"], 'warning' => ['left' => "\033[33m", 'right' => "\033[39m"], 'muted' => ['left' => "\033[90m", 'right' => "\033[0m"], 'pending' => ['left' => "\033[36m", 'right' => "\033[39m"], )
protected array $symbols

Maps symbol names to symbols

Maps symbol names to symbols

# array( 'check' => '✓' )
Properties used from Peridot\Core\HasEventEmitterTrait
$eventEmitter
Peridot API documentation generated by ApiGen