PHPSpec2\Formatter\PrettyFormatter::setIO PHP Method

setIO() public method

public setIO ( IO $io )
$io PHPSpec2\Console\IO
    public function setIO(IO $io)
    {
        $this->io = $io;
    }

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;
 }