Exemple #1
0
 /**
  * Output available reporters
  *
  * @param OutputInterface $output
  */
 protected function listReporters(OutputInterface $output)
 {
     $output->writeln("");
     foreach ($this->factory->getReporters() as $name => $info) {
         $output->writeln(sprintf("    %s - %s", $name, $info['description']));
     }
     $output->writeln("");
 }
         $this->getProphet()->checkPredictions();
     });
     it('should store a reference to input object', function () {
         $input = new StringInput('');
         $input->bind($this->definition);
         $this->emitter->emit('peridot.execute', [$input]);
         expect($this->plugin->getInput())->to->equal($input);
     });
 });
 context('when peridot.reporters event is emitted', function () use($configure) {
     beforeEach($configure);
     it('should register the concurrency reporter', function () {
         $factory = new ReporterFactory($this->config, new BufferedOutput(), $this->emitter);
         $input = new StringInput('');
         $this->emitter->emit('peridot.reporters', [$input, $factory]);
         $reporters = $factory->getReporters();
         expect($reporters)->to->have->property('concurrent');
     });
 });
 context('when peridot.load event is emitted', function () use($configure) {
     beforeEach($configure);
     beforeEach(function () {
         $suite = new Suite("suite", function () {
         });
         $configuration = new Configuration();
         $runner = new Runner($suite, $configuration, $this->emitter);
         $factory = new ReporterFactory($configuration, new NullOutput(), $this->emitter);
         $this->command = new Command($runner, $configuration, $factory, $this->emitter);
         $this->configuration = $configuration;
         $this->emitter->emit('peridot.start', [$this->environment]);
     });