PHPSpec2\Formatter\PrettyFormatter::setStatisticsCollector PHP Method

setStatisticsCollector() public method

public setStatisticsCollector ( StatisticsCollector $stats )
$stats PHPSpec2\Listener\StatisticsCollector
    public function setStatisticsCollector(StatisticsCollector $stats)
    {
        $this->stats = $stats;
    }

Usage Example

Beispiel #1
0
 protected function createFormatter($format, Presenter\PresenterInterface $presenter, Listener\StatisticsCollector $collector)
 {
     if ('progress' === $format) {
         $formatter = new Formatter\ProgressFormatter();
     } else {
         $formatter = new Formatter\PrettyFormatter();
     }
     $formatter->setIO($this->io);
     $formatter->setPresenter($presenter);
     $formatter->setStatisticsCollector($collector);
     $this->dispatcher->addSubscriber($formatter);
     return $formatter;
 }