Behat


Behat\Behat\Formatter\ProgressFormatter
Behat/Behat/Formatter/ProgressFormatter.php at line 30

Class ProgressFormatter

ConsoleFormatter
└─ProgressFormatter
All Known Subclasses:
PrettyFormatter SnippetsFormatter

public class ProgressFormatter
extends ConsoleFormatter

Progress formatter.

Author:
Konstantin Kudryashov

Method Summary
protected array

getDefaultParameters()

Returns default parameters to construct ParameterBag.

static array

getSubscribedEvents()

Returns an array of event names this subscriber wants to listen to.

void

afterSuite(SuiteEvent event)

Listens to "suite.after" event.

void

afterStep(StepEvent event)

Listens to "step.after" event.

protected void

printStep(StepNode step, integer result, DefinitionInterface definition, string snippet, \Exception exception)

Prints step.

protected void

printFailedSteps(LoggerDataCollector logger)

Prints all failed steps info.

protected void

printPendingSteps(LoggerDataCollector logger)

Prints all pending steps information.

protected void

printExceptionEvents(array events)

Prints exceptions information.

protected void

printStepPath(StepNode step, DefinitionInterface definition, \Exception exception)

Prints path to step.

protected void

printSummary(LoggerDataCollector logger)

Prints summary suite run information.

protected void

printScenariosSummary(LoggerDataCollector logger)

Prints scenarios summary information.

protected void

printStepsSummary(LoggerDataCollector logger)

Prints steps summary information.

protected void

printStatusesSummary(array statusesStatistics)

Prints statuses summary.

protected void

printTimeSummary(LoggerDataCollector logger)

Prints suite run time inforamtion.

protected void

printUndefinedStepsSnippets(LoggerDataCollector logger)

Prints undefined steps snippets.

protected void

printSnippets(LoggerDataCollector logger)

Prints steps snippets.

protected void

printPathComment(string path, integer indentCount)

Prints path comment.

protected string

relativizePathsInString(string string)

Returns string with relativized paths.

Methods inherited from Behat\Behat\Formatter\ConsoleFormatter
__construct, configureOutputConsole, createOutputConsole, createOutputStream, exceptionToString, flushOutputConsole, getDefaultParameters, getParameter, getResultColorCode, getWritingConsole, hasParameter, setParameter, setTranslator, translate, translateChoice, write, writeln

Method Detail

Behat/Behat/Formatter/ProgressFormatter.php at line 47

getDefaultParameters

protected array getDefaultParameters()

Returns default parameters to construct ParameterBag.


Behat/Behat/Formatter/ProgressFormatter.php at line 70

getSubscribedEvents

public static array getSubscribedEvents()

Returns an array of event names this subscriber wants to listen to.

The array keys are event names and the value can be:

* The method name to call (priority defaults to 0) * An array composed of the method name to call and the priority * An array of arrays composed of the method names to call and respective priorities, or 0 if unset

For instance:

* array('eventName' => 'methodName') * array('eventName' => array('methodName', $priority)) * array('eventName' => array(array('methodName1', $priority), array('methodName2'))

Returns:
The event names to listen to

Behat/Behat/Formatter/ProgressFormatter.php at line 87

afterSuite

public void afterSuite(SuiteEvent event)

Listens to "suite.after" event.

Uses:
printFailedSteps()
printPendingSteps()
printSummary()
printUndefinedStepsSnippets()

Behat/Behat/Formatter/ProgressFormatter.php at line 105

afterStep

public void afterStep(StepEvent event)

Listens to "step.after" event.

Uses:
printStep()

Behat/Behat/Formatter/ProgressFormatter.php at line 127

printStep

protected void printStep(StepNode step, integer result, DefinitionInterface definition, string snippet, \Exception exception)

Prints step.

Parameters:
step - step node
result - step result code
definition - definition instance (if step defined)
snippet - snippet (if step is undefined)
exception - exception (if step is failed)
Uses:
StepEvent

Behat/Behat/Formatter/ProgressFormatter.php at line 157

printFailedSteps

protected void printFailedSteps(LoggerDataCollector logger)

Prints all failed steps info.

Parameters:
logger - suite logger

Behat/Behat/Formatter/ProgressFormatter.php at line 171

printPendingSteps

protected void printPendingSteps(LoggerDataCollector logger)

Prints all pending steps information.

Parameters:
logger - suite logger

Behat/Behat/Formatter/ProgressFormatter.php at line 185

printExceptionEvents

protected void printExceptionEvents(array events)

Prints exceptions information.

Parameters:
events - failed step events

Behat/Behat/Formatter/ProgressFormatter.php at line 219

printStepPath

protected void printStepPath(StepNode step, DefinitionInterface definition, \Exception exception)

Prints path to step.

Parameters:
step - step node
definition - definition (if step defined)
exception - exception (if step failed)

Behat/Behat/Formatter/ProgressFormatter.php at line 277

printSummary

protected void printSummary(LoggerDataCollector logger)

Prints summary suite run information.

Parameters:
logger - suite logger

Behat/Behat/Formatter/ProgressFormatter.php at line 292

printScenariosSummary

protected void printScenariosSummary(LoggerDataCollector logger)

Prints scenarios summary information.

Parameters:
logger - suite logger

Behat/Behat/Formatter/ProgressFormatter.php at line 305

printStepsSummary

protected void printStepsSummary(LoggerDataCollector logger)

Prints steps summary information.

Parameters:
logger - suite logger

Behat/Behat/Formatter/ProgressFormatter.php at line 318

printStatusesSummary

protected void printStatusesSummary(array statusesStatistics)

Prints statuses summary.

Parameters:
statusesStatistics - statuses statistic hash (status => count)

Behat/Behat/Formatter/ProgressFormatter.php at line 337

printTimeSummary

protected void printTimeSummary(LoggerDataCollector logger)

Prints suite run time inforamtion.

Parameters:
logger - suite logger

Behat/Behat/Formatter/ProgressFormatter.php at line 351

printUndefinedStepsSnippets

protected void printUndefinedStepsSnippets(LoggerDataCollector logger)

Prints undefined steps snippets.

Parameters:
logger - suite logger

Behat/Behat/Formatter/ProgressFormatter.php at line 365

printSnippets

protected void printSnippets(LoggerDataCollector logger)

Prints steps snippets.

Parameters:
logger - suite logger

Behat/Behat/Formatter/ProgressFormatter.php at line 400

printPathComment

protected void printPathComment(string path, integer indentCount)

Prints path comment.

Parameters:
path - item path
indentCount - indenation number

Behat/Behat/Formatter/ProgressFormatter.php at line 413

relativizePathsInString

protected string relativizePathsInString(string string)

Returns string with relativized paths.


Behat