/**
  * @When I run phpspec and answer :answer when asked if I want to generate the code
  * @When I run phpspec with the option :option and (I) answer :answer when asked if I want to generate the code
  */
 public function iRunPhpspecAndAnswerWhenAskedIfIWantToGenerateTheCode($answer, $option = null)
 {
     $arguments = array('command' => 'run');
     $this->addOptionToArguments($option, $arguments);
     $this->prompter->setAnswer($answer == 'y');
     $this->lastExitCode = $this->tester->run($arguments, array('interactive' => true));
 }
 /**
  * @When I run phpspec with the :config (custom) config and answer :answer when asked if I want to generate the code
  */
 public function iRunPhpspecWithConfigAndAnswerIfIWantToGenerateTheCode($config, $answer)
 {
     $arguments = array('command' => 'run', '--config' => $config);
     $this->prompter->setAnswer($answer == 'y');
     $this->lastExitCode = $this->tester->run($arguments, array('interactive' => true));
 }
Exemplo n.º 3
0
 /**
  * @Then /^I answer "([^"]*)" to the prompt$/
  */
 public function iAnswerToThePrompt($answer)
 {
     $this->prompter->setAnswer($answer == 'y');
 }