示例#1
0
 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);
 }