@@ -55,18 +55,24 @@ public function testAsk()
55
55
rewind ($ output ->getStream ());
56
56
$ this ->assertEquals ('What time is it? ' , stream_get_contents ($ output ->getStream ()));
57
57
58
- $ bundles = array ('AcmeDemoBundle ' , 'AsseticBundle ' );
58
+ $ bundles = array ('AcmeDemoBundle ' , 'AsseticBundle ' , ' SecurityBundle ' , ' FooBundle ' );
59
59
60
60
// Acm<NEWLINE>
61
61
// Ac<BACKSPACE><BACKSPACE>s<TAB>Test<NEWLINE>
62
62
// <NEWLINE>
63
- $ inputStream = $ this ->getInputStream ("Acm \nAc \177\177s \tTest \n\n" );
63
+ // <UP ARROW><UP ARROW><NEWLINE>
64
+ // <UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><TAB><NEWLINE>
65
+ // <DOWN ARROW><NEWLINE>
66
+ $ inputStream = $ this ->getInputStream ("Acm \nAc \177\177s \tTest \n\n\033[A \033[A \n\033[A \033[A \033[A \033[A \033[A \tTest \n\033[B \n" );
64
67
$ dialog ->setInputStream ($ inputStream );
65
68
66
69
if ($ this ->hasSttyAvailable ()) {
67
70
$ this ->assertEquals ('AcmeDemoBundle ' , $ dialog ->ask ($ this ->getOutputStream (), 'Please select a bundle ' , 'FrameworkBundle ' , $ bundles ));
68
71
$ this ->assertEquals ('AsseticBundleTest ' , $ dialog ->ask ($ this ->getOutputStream (), 'Please select a bundle ' , 'FrameworkBundle ' , $ bundles ));
69
72
$ this ->assertEquals ('FrameworkBundle ' , $ dialog ->ask ($ this ->getOutputStream (), 'Please select a bundle ' , 'FrameworkBundle ' , $ bundles ));
73
+ $ this ->assertEquals ('SecurityBundle ' , $ dialog ->ask ($ this ->getOutputStream (), 'Please select a bundle ' , 'FrameworkBundle ' , $ bundles ));
74
+ $ this ->assertEquals ('FooBundleTest ' , $ dialog ->ask ($ this ->getOutputStream (), 'Please select a bundle ' , 'FrameworkBundle ' , $ bundles ));
75
+ $ this ->assertEquals ('AcmeDemoBundle ' , $ dialog ->ask ($ this ->getOutputStream (), 'Please select a bundle ' , 'FrameworkBundle ' , $ bundles ));
70
76
} else {
71
77
$ this ->markTestSkipped ();
72
78
}
0 commit comments