getDsl() public method

Get the path to a DSL file containing test functions to use
public getDsl ( ) : string
return string
 /**
  * Load the Peridot environment.
  *
  * @return void
  */
 public function load(ReaderInterface $reader)
 {
     $this->configuration = $reader->getConfiguration();
     require_once $this->configuration->getDsl();
     $peridotCallback = (include $this->configuration->getConfigurationFile());
     if (is_callable($peridotCallback)) {
         call_user_func($peridotCallback, $this->emitter);
     }
 }
Example #2
0
 /**
  * Run the Peridot application
  *
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return int
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     $this->configuration = ConfigurationReader::readInput($input);
     $this->environment->getEventEmitter()->emit('peridot.configure', [$this->configuration, $this]);
     $runner = $this->getRunner();
     $factory = new ReporterFactory($this->configuration, $output, $this->environment->getEventEmitter());
     $this->loadDsl($this->configuration->getDsl());
     $this->add(new Command($runner, $this->configuration, $factory, $this->environment->getEventEmitter()));
     $exitCode = parent::doRun($input, $output);
     $this->environment->getEventEmitter()->emit('peridot.end', [$exitCode, $input, $output]);
     return $exitCode;
 }