You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class DialogHelperTest extends \PHPUnit_Framework_TestCase
@@ -50,6 +51,22 @@ public function testSelect()
50
51
$this->assertEquals(array('0', '1'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, ' 0 , 1 ', false, 'Input "%s" is not a superhero!', true));
$this->assertEquals('1', $dialog->select($output = $this->getConsoleOutput($this->getOutputStream()), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', false));
65
+
66
+
rewind($output->getErrorOutput()->getStream());
67
+
$this->assertContains('Input "Stdout" is not a superhero!', stream_get_contents($output->getErrorOutput()->getStream()));
68
+
}
69
+
53
70
publicfunctiontestAsk()
54
71
{
55
72
$dialog = newDialogHelper();
@@ -63,6 +80,22 @@ public function testAsk()
63
80
$this->assertEquals('What time is it?', stream_get_contents($output->getStream()));
64
81
}
65
82
83
+
publicfunctiontestAskOnErrorOutput()
84
+
{
85
+
if (!$this->hasSttyAvailable()) {
86
+
$this->markTestSkipped('`stderr` is required to test stderr output functionality');
0 commit comments