PHP Класс Peridot\Reporter\AbstractBaseReporter

Наследование: implements Peridot\Reporter\ReporterInterface, use trait Peridot\Core\HasEventEmitterTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$colors array Maps color names to left and right color sequences.
$configuration Peridot\Configuration
$errors array
$output Symfony\Component\Console\Output\OutputInterface
$passing integer
$pending integer
$symbols array Maps symbol names to symbols
$time double | integer

Открытые методы

Метод Описание
__construct ( Configuration $configuration, Symfony\Component\Console\Output\OutputInterface $output, Evenement\EventEmitterInterface $eventEmitter )
color ( $key, $text ) : string Given a color name, colorize the provided text in that color
footer ( ) Output result footer
getConfiguration ( ) : Configuration Return the Configuration associated with the Reporter
getOutput ( ) : Symfony\Component\Console\Output\OutputInterface Return the OutputInterface associated with the Reporter
getTime ( ) : float Get the run time to report.
init ( ) : void Initialize reporter. Setup and listen for events
setTime ( float $time ) Set the run time to report.
symbol ( $name ) : string Fetch a symbol by name

Защищенные методы

Метод Описание
hasColorSupport ( ) : boolean Determine if colorized output is supported by the reporters output.
isOnWindows ( ) : boolean Return true if reporter is being used on windows
outputError ( integer $errorNumber, Peridot\Core\TestInterface $test, $exception ) Output a test failure.
registerSymbols ( ) Register reporter symbols, additionally checking OS compatibility.

Приватные методы

Метод Описание
hasAnsiSupport ( ) : boolean Determine if the terminal has ansicon support
hasTty ( ) : boolean Determine if reporter is reporting to a tty terminal.
isTtyTerminal ( Symfony\Component\Console\Output\StreamOutput $output ) : boolean See if stream output is a tty terminal.
registerEvents ( ) Register events tracking state relevant to all reporters.

Описание методов

__construct() публичный Метод

public __construct ( Configuration $configuration, Symfony\Component\Console\Output\OutputInterface $output, Evenement\EventEmitterInterface $eventEmitter )
$configuration Peridot\Configuration
$output Symfony\Component\Console\Output\OutputInterface
$eventEmitter Evenement\EventEmitterInterface

color() публичный Метод

Given a color name, colorize the provided text in that color
public color ( $key, $text ) : string
$key
$text
Результат string

getConfiguration() публичный Метод

Return the Configuration associated with the Reporter
public getConfiguration ( ) : Configuration
Результат Peridot\Configuration

getOutput() публичный Метод

Return the OutputInterface associated with the Reporter
public getOutput ( ) : Symfony\Component\Console\Output\OutputInterface
Результат Symfony\Component\Console\Output\OutputInterface

getTime() публичный Метод

Get the run time to report.
public getTime ( ) : float
Результат float

hasColorSupport() защищенный Метод

Taken from Symfony's console output with some slight modifications to use the reporter's output stream
protected hasColorSupport ( ) : boolean
Результат boolean

init() абстрактный публичный Метод

Initialize reporter. Setup and listen for events
abstract public init ( ) : void
Результат void

isOnWindows() защищенный Метод

Return true if reporter is being used on windows
protected isOnWindows ( ) : boolean
Результат boolean

outputError() защищенный Метод

Output a test failure.
protected outputError ( integer $errorNumber, Peridot\Core\TestInterface $test, $exception )
$errorNumber integer
$test Peridot\Core\TestInterface
$exception - an exception like interface with ->getMessage(), ->getTraceAsString()

registerSymbols() защищенный Метод

Register reporter symbols, additionally checking OS compatibility.
protected registerSymbols ( )

setTime() публичный Метод

Set the run time to report.
public setTime ( float $time )
$time float

symbol() публичный Метод

Fetch a symbol by name
public symbol ( $name ) : string
$name
Результат string

Описание свойств

$colors защищенное свойство

Maps color names to left and right color sequences.
protected array $colors
Результат array

$configuration защищенное свойство

protected Configuration,Peridot $configuration
Результат Peridot\Configuration

$errors защищенное свойство

protected array $errors
Результат array

$output защищенное свойство

protected OutputInterface,Symfony\Component\Console\Output $output
Результат Symfony\Component\Console\Output\OutputInterface

$passing защищенное свойство

protected int $passing
Результат integer

$pending защищенное свойство

protected int $pending
Результат integer

$symbols защищенное свойство

Maps symbol names to symbols
protected array $symbols
Результат array

$time защищенное свойство

protected double|int $time
Результат double | integer