Example #1
0
 /**
  * Gets the formatter from world and register it into the reporter
  */
 protected function setFormatter()
 {
     $formatterOption = $this->_world->getOption('formatter');
     $formatter = $this->getFormatterFactory()->create($formatterOption, $this->_world->getReporter());
     $this->_world->getReporter()->addFormatter($formatter);
 }
Example #2
0
 /**
  * Gets formatter
  * 
  * @param \PHPSpec\World $world
  */
 public function getFormatter(World $world)
 {
     return $this->getFormatterFactory()->create($world->getOption('f'), $world->getReporter());
 }