PHP 클래스 Peridot\Reporter\AbstractBaseReporter

상속: implements Peridot\Reporter\ReporterInterface, use trait Peridot\Core\HasEventEmitterTrait
파일 보기 프로젝트 열기: peridot-php/peridot 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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