Behat\Behat\Tester\Cli\RerunController::execute PHP Method

execute() public method

Executes controller.
public execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : null | integer
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return null | integer
    public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->eventDispatcher->addListener(ScenarioTested::AFTER, array($this, 'collectFailedScenario'), -50);
        $this->eventDispatcher->addListener(ExampleTested::AFTER, array($this, 'collectFailedScenario'), -50);
        $this->eventDispatcher->addListener(ExerciseCompleted::AFTER, array($this, 'writeCache'), -50);
        $this->key = $this->generateKey($input);
        if (!$input->getOption('rerun')) {
            return;
        }
        if (!$this->getFileName() || !file_exists($this->getFileName())) {
            return;
        }
        $input->setArgument('paths', $this->getFileName());
    }