public function testCanPromptConfirmWithYesNoCharChangedWithSetter() { fwrite($this->adapter->stream, 'oaB'); $confirm = new Confirm("Is ZF2 the best framework ?", "1", "0"); $confirm->setYesChar("A"); $confirm->setNoChar("B"); $confirm->setEcho(false); $confirm->setConsole($this->adapter); ob_start(); $response = $confirm->show(); $text = ob_get_clean(); $this->assertEquals($text, "Is ZF2 the best framework ?\n"); $this->assertTrue($response); }
public function confirm($promptText, $echo = true) { $prompt = new ConfirmPrompt($promptText); $prompt->setEcho($echo); $prompt->setConsole($this->console); return $prompt->show(); }