Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added test case for Command::in loop

  • Loading branch information...
commit 50f30f013439dcf85a6a7ba235468b7a79fbed7b 1 parent f32a0a4
@masom masom authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 libraries/lithium/tests/cases/console/CommandTest.php
View
13 libraries/lithium/tests/cases/console/CommandTest.php
@@ -207,6 +207,17 @@ public function testInWithOptions() {
$result = $command->response->output;
$this->assertEqual($expected, $result);
}
+
+ public function testInWithBadInput(){
+ $command = new MockCommand(array('request' => $this->request));
+ fwrite($command->request->input, "f\n");
+ fwrite($command->request->input, 'y');
+ rewind($command->request->input);
+
+ $expected = "y";
+ $result = $command->in('Everything Cool?', array('choices' => array('y', 'n')));
+ $this->assertEqual($expected, $result);
+ }
}
-?>
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.